XML

20K

Solutions

13K

Contributors

Extensible Markup Language (XML) refers to the encoding of documents such that they can be read by both machines and humans. XML documents use tags to show the beginning and end of a set of data. XML is used extensively on websites to show volumes of data, and is the default for a number of office productivity suites. This topic includes discussions of XML-related technologies, such as XQuery (the XML Query language), XPath (the XML Path language), XSLT (eXtensible Stylesheet Language Transformations), XLink (the XML Linking language) and XPointer (the XML Pointer language).

Share tech news, updates, or what's on your mind.

Sign up to Post

aI have super simple car table (see attached picture)
and I want to use sql query to output like below.

Can you show me how it is generated by using sql script?

<xml>
<Vehicles>
  <Vehicle>
	<Make>Acura</Make>
	<Model>CL</Model>
	<Year>2001</Year>	
  </Vehicle>
</Vehicles>
</xml>

Open in new window

0
Industry Leaders: We Want Your Opinion!
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

I have an XML document that has a bad stylesheet and xmlns info.  I can't change the source systems, but I can't format the document with XSL without manually deleting the bad info first.  Can I strip that info using XSLT?
sterile_invoice_20150213_v1.xml
test.xsl
0
I see alert message "Process cannot access the file because it is being used by another process".
when I click the button at third time. It seems reading is okay. but when i click the button to write something inside  to the xml.
it fails. how can i resolve this issue?


 protected void Page_Load(object sender, EventArgs e)
        {
            phoneNoList.DataSource = Utility.Controller.GetUniquePhoneNo(fromPhoneNo);
            phoneNoList.DataBind();
}

  protected void sendMsg_Click(object sender, EventArgs e)
        {
		 #region add a record to all message xml
                Domain.User u = new Domain.User();
                u.fullName = fullName.Text;
                u.from = "+1" + fromPhoneNo;
                u.to = "+1" + toPhoneNo.Text;
                u.body = body.Text;
                u.dateTimeSent = DateTime.Now.ToString();
                u.direction = "outbound-reply";
                string result = Utility.XML.Add(Utility.Controller.filePathUserMessagesAll, u);
                #endregion


}

  public static string Add(string inputFilePath,Domain.User u)
        {
            XDocument doc = XDocument.Load(inputFilePath);
            XElement user = new XElement("User",
                new XAttribute("PhoneNo",""),
                new XElement("FullName",u.fullName),
                new XElement("From",u.from),
                new XElement("To",u.to),
                new XElement("Body",u.body),
                new 

Open in new window

0
I am new to the forums and looking for some help. I will provide as much information as I can, just be patient with me.
I am looking into Installing Office 365 Pro Plus 2016 on about 150 workstations. They all currently have Office 365 ProPlus 2013 installed. 2013 was pushed out using a GPO created by the last admin using scripts and XML files. I am having issues either doing an in place upgrade OR uninstalling 2013 then installing 2016.

Here is the Install bat file that has been created;

setlocal

Endlocal

Set KEY_Name="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\O365ProPlusRetail - en-us"
Set Value_Name=DisplayVersion
Set Office16=16

for /F "usebackq tokens=3" %%A IN (`reg query %KEY_NAME% /S /v %VALUE_NAME% 2^>nul ^| find "%VALUE_NAME%"`) do (
    set ValueValue=%%A
   
)
set ValueValue1=%ValueValue:~0,2%

if not "%ValueValue1%"=="%Office16%" (
      start /D "\\DOMAIN\software\office 2016 Test\" setup.exe /configure install.xml
      ) else (goto End )
)

:End
REM md "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016"
REM move "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\*2016.lnk" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2016\"

            
Endlocal
0
I already have model and controller that basically doing all the work I need. model is basically our domain class.
and controller is just all of combined classes that do all the thing we want like add, modify the data in xml or database.

our next is to create restful API that allow external users to use it. Do you have very simple example for us to get start it?
0
I have an application that creates an xml file with marker information.  It pulls the text for the info window, but I can't get it to show the picture links as pictures or links. When i add anything to the code to define the links, it breaks the whole map.

Here is my code snippet:
ownloadUrl("phpsqlajax_genxmlx.php", function(data) {
        console.log(data);
        var xml = data.responseXML;
        var markers = xml.documentElement.getElementsByTagName("marker");
        for (var i = 0; i < markers.length; i++) {
          var name = markers[i].getAttribute("name");
          var fulladdress = markers[i].getAttribute("fulladdress");
          var beds = markers[i].getAttribute("beds");
          var type = markers[i].getAttribute("type");
          var drg = markers[i].getAttribute("drg");
          var providernumber = markers[i].getAttribute("providernumber")
          var telephone = markers[i].getAttribute("telephone")
          var owner = markers[i].getAttribute("owner")
          var ImpactofReadmissions = markers[i].getAttribute("ImpactofReadmissions")
          var ReadmissionsAdjustmentFactor = markers[i].getAttribute("ReadmissionsAdjustmentFactor")
          var PneumoniaCases = markers[i].getAttribute("PneumoniaCases")
          var COPDCases = markers[i].getAttribute("COPDCases")
          var ExcessReadmissionRatioforPneumonia = markers[i].getAttribute("ExcessReadmissionRatioforPneumonia")
          var employees = 

Open in new window

0
Hi,
We are working on the requirement.
We are getting transaction data to one staging db ( The table having clob column and store this data as xml). we need to parse this xml and insert/update data in three different tables.

xml  like this::

Batch
   document
       Field information...

Based on the xml.. we need to update
Batch Table
Document Table
Field Table


Regards,
Praven
0
Hi, when I go to a link like: https://medlineplus.gov/feeds/topics/diabetes.xml  in IE(which I hate) or Firefox(which I no longer use, but I remember it did this), it shows the results in a user-readable manner, like:
Capture.JPG
But Chrome shows it like:
Capture2.JPG
I don't want an RSS reader, I don't want to have to save feeds or subscribe, or get notifications. I just want to read the page. Is there a way to do this? Seems so silly that Chrome doesn't just do this. Thanks.
0
Hello,
I am using c# and MySQL. In c# I build an XML string is like below format. I am facing problem in MYSQL stored procedure.

set @xml ='<Details>
    <Levels>
        <Level>
            <SectionId>681</SectionId>
            <RiskId>0</RiskId>
            <WAC>Test </WAC>
            <DOCReview>Test</DOCReview>
            <MAT>1</MAT>
            <SDV>1</SDV>
            <Questions>
                <QuestionId>1186</QuestionId>
                <QuestionId>1187</QuestionId>
            </Questions>
        </Level>
        <Level>
            <SectionId>681</SectionId>
            <RiskId>1</RiskId>
            <WAC>Test </WAC>
            <DOCReview>Test</DOCReview>
            <MAT>2</MAT>
            <SDV>2</SDV>
            <Questions>
                <QuestionId>1186</QuestionId>
                <QuestionId>1187</QuestionId>
                        <QuestionId>1188</QuestionId>
                <QuestionId>1189</QuestionId>
            </Questions>
        </Level>
        <Level>
            <SectionId>681</SectionId>
            <RiskId>2</RiskId>
            <WAC>Test </WAC>
            <DOCReview>Test</DOCReview>
            <MAT>1</MAT>
            <SDV>3</SDV>
            <Questions>
                <QuestionId>1209</QuestionId>
                <QuestionId>1210</QuestionId>
                 <QuestionId>1199</QuestionId>
            </Questions>
        </Level>
      </Levels>
</Details>';


DECLARE tSectionId varchar(20),tWAC …
0
Oh dear experts
I need to read XML files, any advice ?

I need to put an xml in a readable page in VB,
regards
0
Monthly Recap
Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

Word 2016/Win10:

Hi,

In a longstanding Word document, I saw the following after clicking File.

XML warning.
The doc has no macros (if that would make a difference.) Any idea what the XML represents, or how I can find out?

Thanks,
Steve
0
I have codes below and everything works fine except I get alert message below

The process cannot access the file 'c:\abc.xml because it is being used by another process

Just FYI, the xml is used for a website with around 20 users.

   public static DataTable GetUniquePhoneNo(string accountPhoneNo)
        {
            string clientPhoneNo = string.Empty;
            string inputFilePath = filePathUserMessagesAll;
            DataTable dt = new DataTable();
            dt.Clear();
            dt.Columns.AddRange(new DataColumn[]
           {
                new DataColumn("PhoneNo",typeof(string)),
                new DataColumn("Client",typeof(string)),
                new DataColumn("DateCreated",typeof(string))
           });
            XDocument xdoc = null;
            using (XmlReader xr = XmlReader.Create(inputFilePath))
            {
                xdoc = XDocument.Load(xr);
                var query1 = from t in xdoc.Descendants("User")
                             where t.Element("From").Value.ToLower() == "+1" + accountPhoneNo.ToLower()
                             select new
                             {
                                 To = t.Element("To").Value,
                                 FullName = t.Element("FullName").Value,
                                 DateTimeSent = t.Element("DateTimeSent").Value
                                 //DateTime.Parse(txtDatepicker_end.Text).ToString("YYYY-MM-dd");
                             };
     

Open in new window

0
<Details>
    <Levels>
        <Level>
            <SectionId>681</SectionId>
            <RiskId>0</RiskId>
            <WAC>Test </WAC>
            <DOCReview>Test</DOCReview>
            <MAT>1</MAT>
            <SDV>1</SDV>
            <Questions>
                <QuestionId>1186</QuestionId>
                <QuestionId>1187</QuestionId>
            </Questions>
        </Level>
        <Level>
            <SectionId>681</SectionId>
            <RiskId>1</RiskId>
            <WAC>Test </WAC>
            <DOCReview>Test</DOCReview>
            <MAT>2</MAT>
            <SDV>2</SDV>
            <Questions>
                <QuestionId>1186</QuestionId>
                <QuestionId>1187</QuestionId>
            </Questions>
        </Level>
        <Level>
            <SectionId>681</SectionId>
            <RiskId>2</RiskId>
            <WAC>Test </WAC>
            <DOCReview>Test</DOCReview>
            <MAT>1</MAT>
            <SDV>3</SDV>
            <Questions>
                <QuestionId>1209</QuestionId>
                <QuestionId>1210</QuestionId>
            </Questions>
        </Level>
        <Level>
            <SectionId>681</SectionId>
            <RiskId>3</RiskId>
            <WAC>Test </WAC>
            <DOCReview>Test</DOCReview>
            <MAT>2</MAT>
            <SDV>1</SDV>
            <Questions>
                <QuestionId>1186</QuestionId>
                <QuestionId>1187</QuestionId>
                …
0
Hi all, could me please tell me how to create dll file using vba.net. I need to create dll file and use in word vba. I have create dll file and gave reference via word vba but Activex can't create objects error coming..

ex:
Dim tem as testing.test
Set tem = New testing.test

error coming in second line
0
I have an app that writes an XML file, then FTP's it. It normally works OK but running on a different PC I get an error: -Access-Error.png
This crash seems to happen just as it starts writing the text file. Can anyone help?
0
I have an XML file extract with names of people and other details. How do I make this data available on a form of some sorts so end users can perform all kinds of searches on the data. i. e. First Name/Last name text search or even filter the data further using drop down that users can choose from?

I am thinking of loading the XML file into an Oracle database and then display the data as a form on Oracle Apex. However I have no prior experience in Oracle Apex, so I'm assuming it has text search, drilling down features etc.

Ps - this XML data load could end up being a weekly /monthly data load.

Really appreciate your help/suggestions.

Thanks, Ben
0
i have this error in my projectAn exception of type 'System.Xml.XmlException' occurred in System.Xml.dll but was not handled in user code

Additional information: An error occurred while parsing EntityName. Line 1, position 223.
and my code is


   private void BtnShow_Click(object sender, RoutedEventArgs e)
        {
            LblCurrentVersion.Content = (new System.Reflection.AssemblyName(this.GetType().Assembly.FullName)).Version;
            //lblcurrentv.Content = Application.ProductVersion;
           
                string xmlurl = @"http://zahrapersonaccou.yourgig.ir/update.xml";
           
                XDocument xml = XDocument.Load(xmlurl);
           
                foreach (XElement element in xml.Descendants("version"))
                {
                    LblNewversion.Content = element.Value.ToString();
                }

                foreach (XElement element in xml.Descendants("Description"))
                {
                    LblTozihat.Content = element.Value.ToString();
                }
         
        }

how can i solve this error?
0
Hi, All - I need to convert XML to JSON 1-5 times a month, I want to do this on premise on a Windows or Linux server. Online conversions are not an option, doing the task manually is not an option.

I would prefer to find a free option, happy to pay a little money for software however free is best. I was thinking java, ASP - anything really.

The files will be downloaded from an FTP server and placed in a directory, which I then hope to have something pick them up to convert them. Once converted the files will be placed in a  folder.

I am looking for suggestions and ideas on how to make this happen, in the event someone out there is feeling helpful I have attached the two files that I will convert regularly that can be used to create a script.

Thanks
promotionsxml.xml
201707pb.xml
0
So i'm trying to parse some xml with ElementTree, but it's got smileys in what seems to be UTF-16 decimal.
it's got this `&#55357;&#56835;` in it but says it's UTF-8 in the <?xml?> tag.


How do I decode UTF-16? Is that the right question to ask?
0
Enroll in July's Course of the Month
LVL 9
Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Hi, hoping somebody could give me a quick hand with this. Normally I would try figure it out on my own but I am on a very tight time scale and its not something I would usually deal with.

We have been given an XML file that has 2 namespaces, which I have read SSIS will not support.

I want to use an XML task to strip the first namespace. How would I go about doing this?

I have created an XML Task in SSIS, in the input I have put the link to my XML file, then in the output I just left it to "Save operation Result"

In the Second Operand I have put direct input and typed in exclude-result-prefixes="ms ns xsi"   However I am getting an error when I run the code saying it cant find any XML.

Any help / point in the right direction would be really appreciated.
0
Dear Team,

instead of every time inserting data into stored procedure  is it possible that from front end (java) we collect data for example 3 forms we have to submit data and then we collect this data into xml and finally insert into our stored procedure
0
Dears,

I am trying to sort the texts of one particular node (<Name>) of a XML file in ascending order using VB Scripting.

Say, I am using a XML file (xyz.xml) with content as shown below:

<?xml version="1.0" encoding="utf-8"?>
<!--Informations Vendor="Country S.A."-->
<India>
      <Statelist>
            <Name>2122</Name>
            <Name>1011</Name>
            <Name>Karnataka</Name>
            <Name>Goa</Name>
            <Name>Assam</Name>
      </Statelist>
</India>

The expected output is:

<?xml version="1.0" encoding="utf-8"?>
<!--Informations Vendor="Country S.A."-->
<India>
      <Statelist>
            <Name>1011</Name>
            <Name>2122</Name>
                <Name>Assam</Name>
            <Name>Goa</Name>
            <Name>Karnataka</Name>            
      </Statelist>
</India>

Can someone please help me here?

Best regards
Chethan Bangera
0
<target name="build" depends="updateMavenDependencies" description="Builds all extensions">
        <callback extname="" target="before_build"/>
        <build/>
        <callback extname="" target="after_build"/>
    </target>


Also what is extname= "" ?
0
I am having an issue I have had for well over 6 months. I have exhausted support queues all over the world; including Microsoft. I am desperately looking for some help. I will attempt to keep this as brief as possible.

Problem Description:

Outlook 2010/2013/2016 can not connect externally (outside of domain) to Exchange 2013 server using Autodiscover.
Outlook internally works fine.
OWA works internally and externally.
ActiveSync (mobile phones) works.
Microsoft Connectivity Analyzer fails with the following:

-----


Attempting to send an Autodiscover POST request to potential Autodiscover URLs.
       Autodiscover settings weren't obtained when the Autodiscover POST request was sent.
       
      Additional Details
       
Elapsed Time: 1329 ms.
       
      Test Steps
       
      The Microsoft Connectivity Analyzer is attempting to retrieve an XML Autodiscover response from URL https://autodiscover.contoso.com:443/Autodiscover/Autodiscover.xml for user user@contoso.com.
       The Microsoft Connectivity Analyzer failed to obtain an Autodiscover XML response.
       
      Additional Details
       
An HTTP 401 Unauthorized response was received from the remote Unknown server. This is usually the result of an incorrect username or password. If you are attempting to log onto an Office 365 service, ensure you are using your full User Principal Name (UPN).
HTTP Response Headers:
request-id: bbcd930e-deed-43fb-9b19-584ba12a2af3
Set-Cookie: ClientId=KVITD9HXKQJAAENNT09PG; expires=Sat, 07-Jul-2018…
0
Hello Experts,

I have a code written in C# that signs an XML document. For past fe month it was working without a problems but this month my old certificate expired so we ordered a new one.

Now when i try to sign the document it creates two (2) nodes with different values in it (see below):
<KeyInfo>
	<X509Data>
		<X509Certificate>XXXXXXXXXXXXXXXXXXX</X509Certificate>
		<X509Certificate>YYYYYYYYYYYYYYYYYYY</X509Certificate>
	</X509Data>
</KeyInfo> 

Open in new window


Code that i use to create the signature is roughly like this:

private SignedXml getSignedXml(string idReference, int step)
    {
      SignedXml signedXml = new SignedXml(this.xmlDocument);
      signedXml.Signature.Id = "SignatureId";

      signedXml.SigningKey = this.certificate.PrivateKey;
      signedXml.KeyInfo = this.getKeyInfo();
      signedXml.SignedInfo.CanonicalizationMethod = SignedXml.XmlDsigC14NTransformUrl;
      signedXml.AddReference(this.addInvoiceReference(idReference));

      if (step == 1)
        signedXml.AddObject(this.createQualifyingProperties());
      else
      {
        signedXml.AddObject(this.readQualifyingProperties());
        signedXml.AddReference(this.addSignedPropertiesReference());
      }

      return signedXml;
    }

Open in new window


private KeyInfo getKeyInfo()
    {
      KeyInfo keyInfo = new KeyInfo();
      KeyInfoX509Data keyInfoX509Data = new KeyInfoX509Data(this.certificate, X509IncludeOption.ExcludeRoot);
      keyInfo.AddClause(keyInfoX509Data);
      return keyInfo;
    }

Open in new window




Open in new window

0

XML

20K

Solutions

13K

Contributors

Extensible Markup Language (XML) refers to the encoding of documents such that they can be read by both machines and humans. XML documents use tags to show the beginning and end of a set of data. XML is used extensively on websites to show volumes of data, and is the default for a number of office productivity suites. This topic includes discussions of XML-related technologies, such as XQuery (the XML Query language), XPath (the XML Path language), XSLT (eXtensible Stylesheet Language Transformations), XLink (the XML Linking language) and XPointer (the XML Pointer language).