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

I am trying to query/get the value of a node from an xml which has namesopaces.
However I always get "Object reference not set to an instance of an object."

Here is the xml that I am using -

I am using the following code to retreive the value of the node, as marked in the xml -

 string xmlResponse = "<?xml version=\"1.0\" encoding=\"utf-8\"?><feed xml:base=\"https://abcd.com/_api/\" xmlns=\"http://www.w3.org/2005/Atom\" xmlns:d=\"http://schemas.microsoft.com/ado/2007/08/dataservices\" xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\" xmlns:georss=\"http://www.georss.org/georss\" xmlns:gml=\"http://www.opengis.net/gml\"><id>asd-123-qwe-456-zxc</id><title /><updated>2018-09-18T12:18:54Z</updated><entry><id>https://abcd.com/_api/SP.WebParts.WebPartDefinitionasd-123-qwe-456-zxc</id><category term=\"SP.WebParts.WebPartDefinition\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" /><link rel=\"edit\" href=\"SP.WebParts.WebPartDefinitionasd-123-qwe-456-zxc\" /><link rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/WebPart\" type=\"application/atom+xml;type=entry\" title=\"WebPart\" href=\"SP.WebParts.WebPartDefinitionasd-123-qwe-456-zxc/WebPart\"><m:inline><entry><id>https://abcd.com/_api/SP.WebParts.WebPartDefinitionasd-123-qwe-456-zxc/WebPart</id><category term=\"SP.WebParts.WebPart\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" /><link 

Open in new window

Become a CompTIA Certified Healthcare IT Tech
LVL 12
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

I am attempting to set up a new multiforest ldap instance but am getting stuck with the install of the xml file, followed by a sync. I may be confusing the matter and need some instruction on what steps are correct if I am attempting to pull in and sync all remote domain users to the multiforest partition and how to resolve associated errors.

Steps taken and code used:

XML Code:

<description>Import domain USers</description> 

Open in new window

Adamsync /install Command: (no creds)

ADAMSync /install localhost:52512 c:\windows\ADAM\MS-AdamSyncConfdomain.xml /log c:\windows\adam\logs\install.log

Establishing connection to target server localhost:52512.
Updating configuration file on c:\windows\ADAM\MS-AdamSyncConfdomain.xml.
Reading Configuration File from c:\windows\ADAM\MS-AdamSyncConfdomain.xml
Saving Configuration File on dc=multiforest,dc=local
Saved configuration file.

ADAMsync /install (with creds)

ADAMSync /install localhost:52512 c:\windows\ADAM\MS-AdamSyncConfNLS.xml /creds domain.k12.mn.us administrator password /log c:\windows\adam\logs\install.log

Establishing …
I have an XML document and I need to read a specific value by calling XPATH.
My problem is that, when a tag A is present (no matter if has value or not, just be present in the document), I have to read tags X1 and X2. Otherwise I have to read another pair of tags.

Example: below, if "mytagA" exists somewhere, I have to search and get X1 ("1000") and X2 ("MAN")


Open in new window

However, below the tag "mytagA" does not exist and in this case I need to read Y1 ("123.45") and Y2 ("ORANGE")

  <mytagB>another thing</mytagA>

Open in new window

How can I do this with one XPATH one-line function ?
Reason is I am calling the XPATH from a program, and the program fails because of this "if exists" problem...

Can you help me?
I am having a hard time getting an XSL Transformation file to give me the desired output for the given XML file input
I have the following tiny C# console app which reads an XML and searches a value of a tag using a single XPATH. i don't want to change the way it is implemented (via navigator) but I need a small function to add the namespaces; otherwise i can't use it in many different XML documents. May you help me?
Below what I have (working):

using System;
using System.Xml;
using System.Xml.XPath;

namespace ConsoleApp1
    class Program

        static void Main(string[] args)
            XPathNavigator nav;
            XPathDocument docNav;
            XmlNamespaceManager nsMgr;

            // Openning MYXML doc
            docNav = new XPathDocument(@"c:\Users\Somebody\Desktop\xml\MYLASTXML.123456.MYXML.xml");

            // Creating a navigator to query using XPath.
            nav = docNav.CreateNavigator();

            //Add Namespaces for scb and conf
            nsMgr = new XmlNamespaceManager(nav.NameTable);
            nsMgr.AddNamespace("abc", "http://www.ababab.com/MYXML-1");
            nsMgr.AddNamespace("conf", "http://www.fpml.org/FpML-5/confirmation");
.... //I should continue add namespaces here but I need a function to populate with all namespaces found in the XML document..... can you help?

            nav = docNav.CreateNavigator().SelectSingleNode("/abc:MYXML/blahblahblah/conf:productId[@productIdScheme='http://www.fpml.org/coding-scheme/external/instrument-id']/text()", nsMgr);


Open in new window

I have the following XML Response I want to save into an object class.   The issue I am having it getting the inner element tag attributes into fields for the object.  I know how to get the innerXml but the attributes inside the tag not sure of.

If I have an enumerable of these XML elements coming back how can I get these into an IEnumerable class the best way the values id, succeed etc for each entry and return?

<result-entry result-id="60362" succeed="Yes"><return FORMATTED_RESULT="5" STATUS="C"/></result-entry><result-entry result-id="60363" succeed="Yes"><return FORMATTED_RESULT="10" STATUS="C"/>

verse outputclass elements in to a single group of element of div elment to the verse elements as shown in the below format

My XML code is:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE topic
    <topic id="topic_31" xml:lang="en-US" outputclass="Back-Matter">
          <p outputclass="E-Head">E-Head</p>
        <p outputclass="F-Head">F-Head</p>
        <p outputclass="Body-Text">Body-Text (Tx)</p>
        <p outputclass="Body-Text-ContinuedTxc">Body-Text-Continued</p>
        <p outputclass="Verse1">Verse1 (Vrs1)</p>
        <p outputclass="Verse1-indent1">Verse1-indent1 (Vrs1-i1)</p>
        <p outputclass="Verse1-indent2">Verse1-indent2 (Vrs1-i2)</p>
        <p outputclass="Verse1-indent3">Verse1-indent3 (Vrs1-i3)</p>
        <p outputclass="Verse2Vrs2">Verse2 (Vrs2)</p>
        <p outputclass="Verse2-indent1Vrs2-i1">Verse2-indent1 (Vrs2-i1)</p>
        <p outputclass="Verse2-indent2Vrs2-i2">Verse2-indent2 (Vrs2-i2)</p>
        <p outputclass="Verse2-indent3Vrs2-i3">Verse2-indent3 (Vrs2-i3)</p>
        <p outputclass="QuotationQuo">Quotation (Quo)</p>
        <p outputclass="Extract1Ext1">Extract1 (Ext1)</p>
        <p outputclass="Extract2Ext2">Extract2 (Ext2)</p>
        <p outputclass="E-Head">E-Head</p>
        <p outputclass="F-Head">F-Head</p>
        <p outputclass="Body-Text">Body-Text (Tx)</p>
        <p outputclass="Body-Text-ContinuedTxc">Body-Text-Continued</p>
I have a .NET WCF service which communicates with a time and attendance clocking terminal.
The WCF service method is as follows:
[WebInvoke(UriTemplate = "/Status", Method = "POST")]
public Stream Status(XmlElement status)
    XmlDocument xml = new XmlDocument();

    string terminal = xml.SelectSingleNode("/StatusResponse/@terminal").Value;
    string uid = xml.SelectSingleNode("/StatusResponse/@uid").Value;

    StringBuilder builder = new StringBuilder();
    builder.Append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    builder.Append("<OperationStatus uid=\"" + uid + "\">OK</OperationStatus>");

    return new MemoryStream(Encoding.UTF8.GetBytes(builder.ToString()));

The WCF service is choking on ascii characters (ASCII 31) which are contained within the XML being sent from the terminal.
There is an error in XML document (3, 55), this is the ASCII 31 character after SR00 in the XML.

It is not possible to change the firmware on the terminal so I need to modify the WCF service to cope with the ascii characters.
If need be the ascii characters can be removed, however this must be done by the WCF service and not the client.

Details from Wireshark below :

POST /AccutouchService.svc/status HTTP/1.1
Accept: */*
Date: Sun, 26 Aug 2018 15:21:45 GMT
Authorization: ATS 000001714134:PASS
Content-Type: application/xml
Accept-Encoding: gzip
User-Agent: UCS-XML/3.0 …
Trying to get a session code response from the Betfair site using VB6. My software, which I've written and been using in a particular industry for 20 years, therefore huge amount of code, so trying to do it through VB6, and I've done other XML feeds using the Web Service, which are working really well.

So.... the issue is, i make a call to the site, and the return I get is HTTP ERROR CODE 400 through the response text.

Part of the process, required I create a certificate, using OPENSSL , which worked fine, and the certificate uploaded to my test account on Betfair, and the account has been enabled for access. I've also sent the P12 Key to my certificate store on my local Windows 7 (32 Bit) development computer, which allowed the call to go through without any "Certificate Required" prompts, so appears to get through that part. However, once through the response coming back is "HTTP ERROR CODE 400", in the response text. So it's not making my code fall over in any way, just not returning a session key, which is obviously required to proceed further.

The code is as follows, of which a username and password string is passed to the function from a login form.

Public Function GetBetfairSessionID(sUserName As String, sPassword As String) As BetfairSessionInfo
    Dim AuthURL As String

    AuthURL = "https://identitysso.betfair.com/api/certlogin"
    Set myMSXML = CreateObject("MSXML2.ServerXMLHTTP")

Open in new window

we need to extract value from below xml tag

select extractValue(value(vy), '//NARRATIVE/NA_LOAD_DT') dateloaded,
                               extractValue(value(vy), '//NARRATIVE/NA_LOADED_BY') loadedby,
                               extractValue(value(vy), '//NARRATIVE/NA_TYPE') nartype,
                               extractValue(value(vy), '//NARRATIVE/NA_TEXT') text
                          from table(XMLSequence(Extract(lx_xml,
                                                         '//RESPONSE/MESSAGE/ITEM/RSP_REPORT/CONSUMER/NARRATIVES/NARRATIVE type="M"'))) vy)
Starting with Angular 5
LVL 12
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

Hello Experts,
This is the first time I am going to use WEB SERVICES
I have to send one or more XML files inside a folder that is zipped.

and I have a URL address... a username and a password.

also got a Digital certificate and the public key is already uploaded and properly registered.

Can you send me a simple example source code in
visual basic or visual c# on how to do this?

I am trying to write a small extraction program using C#. Looking at the example below I am trying to extract IVIOINFO,MYDATABASE and IVItem Other Info.
<DataObject PhysicalName="IVIOINFO" Resident="N" data_source="MYDATABASE" name="IVItem Other Info"><Encrypt val="N" />

In other words I want everything within the quotation marks and to ignore everything else. These data elements are the physical data table name, the database it resides in and the long table name.

tw.WriteLine("{0,0},{1,-0}", tc, objectString.Substring(objectString.IndexOf("data_source")+13,12));  would get me MYDATABASE
tw.WriteLine("{0,0},{1,-0}", tc, objectString.Substring(objectString.IndexOf("PhysicalName")+14,12));  would get meIVIOINFO
tw.WriteLine("{0,0},{1,-0}", tc, objectString.Substring(objectString.IndexOf("name")+6,12));  would get me IVItem Other Info

The problem I have is determining how long the strings will be. Using 12 all the time does not work because when the text is shorter than 12 I get an error message about the index overshooting the length of the string.  How can I have it find the first quotation mark, get the string and stop at the next quotation mark?

I need to know the available SWIFT Message Parsers for reading unstructured BLOB and structuring the data into XML or some other format.

I did my research and found a few to name below but wasn't convinced if they are enterprise level and scalable.

1. Informatica has a tool to extract messages but it has limitations.
2. Data Transformation SWIFT OOTB library.
3. Volanté
4. Paymentcomponents (http://www.paymentcomponents.com/) parser is easy to use and finds all errors.

Any thoughts?
Thanks in advance.
I had this question after viewing Change a specific key value in app.config file with another value..

i have  a config file as below
    <server name="EDMServer" description="EDMServer" username="" password="" integratedSecurity="true" />
    <server name="EDMServer" description="EDMServer" username="" password="" integratedSecurity="true" />
    <add name="ExposureSource" value="path" />
    <add name="DomainDatabase" value="Server=HeadNode;Initial Catalog=RMS_MEE_Data;Integrated Security=True;" />
    <add name="ResultsDatabase" value="Server=HeadNode;Initial Catalog=RMS_MEE_Results;Integrated Security=True;" />
    <add name="JobManagerService" value="url" />
    <add name="licensecode" value="code" />
    <add name="WhiteListedIPAddresses" value="*" />

 in settings , i want to change the name which contains licensecode to newcode. how do i do this.

$ConfigFile = 'C:\Users\psman\Downloads\dev_qa.config'
## XML Node names and Attributes are CaSe SeNsItIvE!
$xml = [xml](Get-Content -Path $ConfigFile)

$xml.SelectSingleNode("meeservices/settings/add[@name='licensecode']").SetAttribute("name", "data1")

I am trying to produce XML output from the following sql query:

select distinct
Builder.DivisionName as [Name]
,convert(varchar, getdate(), 126) as [DateGenerated]
,Builder.ClientdivisionID as [NHTNumber]
,Organization.DivisionName as [Name]
,cast(Organization.ClientdivisionID as varchar) as [LocationNumber]
,'Div' as [LocationLevel]
,[Option].[Option] OptionNumber
,'Normal' as OptionType
,[Option].SubCategoryName CategoryNumber
,[Option].Description as OptionName
,substring([Option].Comments,1,2000) as OptionDescription
MasterOptionList [Option]
join (Select top 1 '' as OganizationOptionsID from SystemConfiguration) OganizationOptions  on OganizationOptionsID=''
join Division Builder on Builder.ClientdivisionID =1
join Division Organization on Organization.ClientdivisionID =[Option].ClientdivisionID
where [Option].IsInactive = 0
order by cast(Organization.ClientdivisionID as varchar)
for xml auto

My desired Output looks like this:

<Builder Name="Builder Name." DateGenerated="2018-08-11T11:55:05.120" NHTNumber="1">
<Organization Name="Division A" LocationNumber="2" LocationLevel="Div">
      <Option OptionNumber="ANDAV01C01" OptionType="Normal" CategoryNumber="GENERAL" Price="6350.00">
            <OptionName>Extended Master Bedroom</OptionName>
            <OptionDescription>2 feet wider</OptionDescription>
        <Option OptionNumber="ANDAV01C02" OptionType="Normal" …
Hi Team,

I have an XML file i need to parse the XML and covert the output into CSV file .

I need output like below . Please help me with the code.
StableChangeVersion|LocalId|Trading Account|type|Value|Status

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<StandingSettlementInstruction xmlns="http://www.service.cdds.cs.com/ssiData_2">
Hello guys,

I have to implement an xml signature routine using smart card / token using x.509 signatures in a web application using python. The initial purpose would be for the user to sign xml files that the system generated using the client's certificate. I know that one kind of solution to this situation involves several steps. I'm primarily thinking of python communication with the user's smarcard / token.

I did some testing using python-pkcs11, worked well with an eToken Alladin Pro 72. But when I tried to use a newer smartcard (OberThur Cosmo v7.0.1 PCKS # 15) did not work.

Is there any library in python with pkcs11 and pkcs15 support?

Or will my life go easier by creating middleware in .net or java?

Hello all,

Kindly advice how I can send XML data to a Restful URL..  

Please provide me some sample codes.

I have created a WCF service but unfortunately its not sending anything and moreover i am getting following error message
The remote server returned an error: (415) Unsupported Media Type.

Following is the WCF code.
Dim xml As String
xml = "http://send/p1/?xml=<?xml version=""1.0"" encoding=""utf-8""?>" +
"<Emp ID=""1234"">" +
"<EmpDtls>" +
"<Empno>" & Empno & "</empno>" +
"</EmpDtls>" +
Dim url As String = "http://send/p1"
Dim req As HttpWebRequest = DirectCast(WebRequest.Create(url), HttpWebRequest)
Dim requestBytes As Byte() = System.Text.Encoding.ASCII.GetBytes(xml)
req.Method = "POST"
req.ContentType = "text/xml;charset=utf-8"
req.ContentLength = requestBytes.Length
Dim requestStream As Stream = req.GetRequestStream()
requestStream.Write(requestBytes, 0, requestBytes.Length)
Dim res As HttpWebResponse = DirectCast(req.GetResponse(), HttpWebResponse)
If res.StatusCode = HttpStatusCode.OK Then

End If
Dim sr As New StreamReader(res.GetResponseStream(), System.Text.Encoding.[Default])
Dim backstr As String = sr.ReadToEnd()

<proxy usesystemdefault="False"/>

<compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
Integration with Oracle OPERA. I have a customer who uses Oracle OPERA for their hotel bookings etc. The customer would like to have an email sent out a couple days before their reservation and then upon checkout. I was thinking Microsoft FLOW would be a good candidate, however, I'm not sure if FLOW is able to connect to the Oracle database.
Someone mentioned that OPERA has an XML web service, however, didn't really elaborate as to if this would work for my scenario. I'm open to suggestions and what would be the best or at least a recommended way of getting booking information such as the name, dates and email addresses.
If Microsoft FLOW is not recommended, would a C# application be advisable to use?

Currently, we have someone who creates an email list everyday and sends through Mail Chimp. Thanks for your assistance in advance.
Rowby Goren Makes an Impact on Screen and Online
LVL 12
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.



what is the best approach to copy a schema to a new schema with in same Data Base if I have LOB , CLOB and XML data Types.

I also have generated columns in my schema.

In IBM documentation, it is clear that it (ADMIN_COPY_SCHEMA utility) does not support XML Data , as below.

(Please refer the heading Restrictions )

How to handle this case of copying the schema.
Hi Team,

I have multiple XML files I have to covert the XML data into CSV file and to generate the into CSV output file.
Could you please help me in this.

i need data in csv file ;
I have created an XML type file within a field of a table. (See attached) I know need to send that content as an XML file.
I have been recommended CURL but to be honest I am not sure where to start.
How do I get that field out of Access to be able to send?
Any help gratefully received

I have the following custom XML file, which i am not sure would work or not? So can someone clarify it it would work?

I am applying this via GPO but at the moment i am not 100% about my actual XML file.

The policy is being applied in the user GPO using the computer loopback GPO.

Any help on this would be fantastic!

<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout"
xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1"
<CustomTaskbarLayoutCollection PinListPlacement="Replace">
        <taskbar:DesktopApp DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\Accessories\Internet Explorer.lnk"/>
        <taskbar:DesktopApp DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Program Files\internet explorer\iexplore.lnk" />
      <taskbar:DesktopApp DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Program Files (x86)\Google\Chrome\Application\chrome.lnk" />
      <taskbar:DesktopApp DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Program Files (x86)\Autodesk\Autodesk Design Review\DesignReview.lnk" />
      <taskbar:DesktopApp …
Hi, I am new to ASP.net programming. Fyi, I am trying to read title data(xml data) from my response query string(working), however, I couldn't retrieve any data from my code.

protected void Update_btn_click(object sender, EventArgs e)
            String new_title = newtitle.Text.ToString();
            String new_description = update_des.Value.ToString();
            String postid = Request.QueryString["pid"];

            string filename = "C:\\Users\\user\\Source\\Repos\\FoodBlog\\FoodBlog\\Data\\blog_post.xml";
            XmlDocument xml_doc = new XmlDocument();
            XmlNode elemList = xml_doc.SelectSingleNode("/Posts/Post[@pid=" + postid + "]");
            String test = elemList.ChildNodes[0].Innertext;

Open in new window

My XML data :
<post pid="pid2623">
    <date>7/29/2018 12:00:00 AM</date>

Open in new window

Hi Team,

I have multiple XML file in a txt file in same format with attributes and the data . I have convert the XML file data into CSV with | separator and to generate the CSV out file

I need generate  the data in csv  file as below format

could you please help me in this .

PFA sample txt file

Many thanks in Advance,

sample file:-
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<StandingSettlementInstruction xmlns="http://www.service.cdds.cs.com/ssiData_2">






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).