Articles & Videos



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 create a Json object in C# that I will convert to XML.   I have a repeating set of Fees that I need to add to the json object.

Here is my code so far:

root.Deal.Fees = new ExpandoObject();
List<ExpandoObject> feeArray = new List<ExpandoObject>();

foreach (DataRow ro in ds.Tables["fees"].Rows)
    root.Deal.Fees.DealFees.Fee.Description = ro["fee_type"].ToString();;
    root.Deal.Fees.DealFees.Fee.Amount = ro["amount"].ToString();


Open in new window

No sure what else is needed.   Supply a different example if that is easier for you.
Thank you
The Orion Papers
The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.


I am writing a VB6 program to read an XML file.  The XML has encoding="UTF-8".

I have everything working with the exception of the embedded attachments.  There is a file name (jpg, doc, etc.) which I can pick up.  My problem is that the data element is just a bunch of characters.  Somehow I need to take the group of characters and convert it to a jpg or doc file.  

Does anybody know if this is possible,  and if so,  how is it done?

Thanks for your help!
I have  sun server that runs a local application that uses the following ports: JMS 5630, XML 9672,
ASP Http 80 and ASP https 443, i can only telnet to port 80, telneting to the other ports I get
unable to connect to remote host: connection refused. I checked the /etc/services and I do not see the ports listed.
BTW: This application used to work without problems...

I'm getting "duplicate attribute" error when attempting to create this document.  Is it not allowed to have the multiple Filter Field entries?

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<ApiDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://microsoft.com/wsdl/types/">
      <Filter Field="FiscalDate" Operator="Greater than or equal" Value="2017-06-19T00:00:00.000" />
      <Filter Field="FiscalDate" Operator="Less than" Value="2017-06-20T00:00:00.000" />
      <Filter Field="Location" Operator="Equal" Value="100" />
      <SortDescription Name="FiscalDate" Direction="Ascending" />
Please help! I'm receiving a "Problems During Load" prompt when I try and open up my XML file. I am able to open it in NotePad, but I can't seem to get it open no matter what I do. I would really appreciate if someone could take a look!

I attached the file.
Dear experts,
I am facing a request from a customer, who maintains about 500 product sheets to different products. So far all the data were kept in Word and PDF files were made manually. Th maintenance was a nightmare and publishing online was nearly impossible.

Now the product sheets will be saved in a database / XML so that with help of some CSS libraries/frameworks (bootstrap etc.) site nice layout can be achieved while keeping the simplicity of editing content in a database and displaying the sheets online. For better reading and design reasons the sheets will contain TWO columns on normal screen and paper and 1 column only on mobile devices. This all is doable. Somehow.

However the next requirement is to be able to generate PDFs out of the same source (database/xml) and the PDF shall, of course, keep the layout for DIN A4 paper - header, footer, two columns, which flow always on first page from left column to right column and then on next pages again from left to right column. Like when you load a text in indesign for example. So that the PDFs when printed can be red.

Unfortunately the HTML page does not respect the fixed length of a DIN A4 paper and when showing two columns, they flow till the bottom of the page "infinitely".  When I tried to play with bootstrap for example, I was able to accomplish the HTML part, but then I was unable to either print it to PDF or even while using some PDF library to generate A4 standalone pages.

I hope I am expressing …
I have a problem serialializing xml

I do not get all 3 values of 'liggingen' back in the object. I only get the first value. I tried to make a list, but no success.
What is the error in the user defined object?

This is part of the user defined object
Public Class MatenEnLigging
        Public Liggingen As Liggingen
        Public Inhoud As Integer
        Public Oppervlakte As Integer
End Class

Public Class Liggingen
        Public Ligging As String
End Class

And this is part of the XML
        	<Ligging>aan bosrand</Ligging>
            	<Ligging>aan rustige weg</Ligging>
	        <Ligging>beschutte ligging</Ligging>

Open in new window

I'm able to customize the Excel 2010 Ribbon, adding custom tabs/groups and hiding built-in tabs etc. as needed by using a CustomUI xml file.  I do this by starting the ribbon from scratch using:

 <ribbon startFromScratch="true">

... and then adding my own custom tabs/groups in the xml file.

What I would like to do is to leave the xml so the built-in ribbon is visible, for example, using:

 <ribbon startFromScratch="false">

but within the Excel application itself, use VBA code to hide (or remove) certain built-in Tabs from the Ribbon.

In other words, I'd like the VBA code to do the equivalent of:

 File > Options > Customize Ribbon > [select a Tab by name, e.g. 'Insert'] > Remove

The above steps can be done manually to get the desired result but I can't seem to find the VBA code to do it with.

Using SENDKEYS doesn't seem robust enough and only takes me a few steps into the File > Options > ... sequence before I'd have to resort to sending cursor control movements like cursor down, etc..
Hi all,

I am very new to working on XML data or files. I need to load data from below XML to a table in sql server. But i am unable to even parse it, i have tried few different methods like xquery and OpenXML but no luck. I am getting blank columns, i think i am not giving proper nodes to navigate to data. I am struggling with this since last 2 days :-(


 <?xml version="1.0" encoding="UTF-8" ?> 
- <Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:iso:std:iso:20022:tech:xsd:pain.008.001.02">
- <CstmrDrctDbtInitn>
- <GrpHdr>
- <InitgPty>
  <Nm>Ter Elst BVBA</Nm> 
- <Id>
- <PrvtId>
- <Othr>
- <PmtInf>
- <PmtTpInf>
- <SvcLvl>
- <LclInstrm>
- <Cdtr>
  <Nm>Ter Elst BVBA</Nm> 
- <CdtrAcct>
- <Id>
- <CdtrAgt>
- <FinInstnId>
- <CdtrSchmeId>
- <Id>
- <PrvtId>
- <Othr>
- <SchmeNm>
- <DrctDbtTxInf>
- <PmtId>

Open in new window

( An extension of this question.. )

Given the below SQL Server 2008  T-SQL statement and XML fragment, how would I return the value 'Sammy Hagar' WHERE boo i:type="rockstar" ?
SET @x = '<goo xmlns="http://underdog.com" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
   <boo i:type="fruit">banana</boo>
	<boo i:type="rockstar">Sammy Hagar</boo>
	<boo i:type="planet">Mars</boo>
	<boo i:type="movie">Heathers</boo>
	<boo i:type="practicaljoke">Rick Roll</boo>
WITH XMLNAMESPACES ('http://underdog.com' as d) 
SELECT @x.value('(/d:goo/d:foo/d:boo)[1]', 'varchar(64)') AS the_amount

Open in new window

Guide to Performance: Optimization & Monitoring
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

< Highly mocked up SQL Server 2008R2 T-SQL >
SET @x = '<goo xmlns="http://underdog.com" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
SELECT @x.value('(/goo/foo/boo)[1]', 'varchar(64)') AS the_amount

Open in new window

I'm expecting to return a the_amount value of 'banana', but I'm always getting NULL.  What's the fix?
Is it possible to check duplicate attribute values within same element using an XSD ?

For example:

<MyProduct  category="school" code="123">Pencil</MyProduct>
<MyProduct category="home" code="343">Vase</MyProduct>
<MyProduct category="home" code="752">Fork</MyProduct>
<MyProduct category="school" code="123">Eraser</MyProduct>

Open in new window

In the above example, a pencil and an eraser belong to same category and have same code. How can I control that no product ("MyProduct") can have same category *and* code?
(if possible)

Note: in above example, categories and codes have a specific list of values (i.e. I know I have 12 categories and 728 codes).
Thank you
I have to build an XSD and I need to have the following double conditions declared when I define an element.

1. For a given element, only a specific list of attributes is permitted. Example:

<MyElement  currency="USD" payment="online" other="today">some values here</MyElement>

Open in new window

I need MyElement to be allowed to have attributes only 'currency' and/or 'payment' but no 'other' .

1.1. For the ALLOWED attributes, I need to have a permitted list of values. Example:

<MyElement  currency="USD" payment="online">some values here</MyElement>

Open in new window

I need the 'currency' attribute to take only values USD, AUD.. etc as I specify in a list (I have a list ready)
And I need the attribute 'payment' to take one of the two values "online" or "cash".

How can I declare the MyElement in an XSD ?
Your help is much appreciated..
I have my XML file which was generated using Soap-UI and our testers are able to execute the test case by calling the api's from Soap-UI with out any issues. But when the same I integrated as a part of continuous integration using Maven I am not getting the result as expected. All of the test cases are failing

Here is the pom.xml I have
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<name>Maven 2 SoapUI Sample</name>

Open in new window

I have already make a "XML Maps" Mapping list under the XML Sources.
It works file when I do the XML import to the Excel sheet.

However, I would like to add the file name of the XML which imported to the excel.
Can anyone help me on this?

Enclosed with the Excel sheet with the mapping list included
I am very new to shell scripting and i want to do following
read a xml file to extract value of <not_matched> tag,
from each of <SQL_Analysis>,<Data_Analysis>,<Graph_Analysis>,<Excel_Analysis>,<Pdf_Analysis> tags and compare it against a some value and depending on the result say Pass or Fail.

Any help much appreciated.

XML file as below :
I am having a SOAP API project in which I send the request in XML while calling the API from SOAP UI to create the account on portal. In return, I get the response in XML.

Now I want to change it to Web UI (Don't want to use SOAP UI). To do that I want to use HTML form which will have input fields like v1:type,company name etc (Currently, I pass the fields in XML request using SOAP UI) and while submitting the form, API should be triggered and parse the XML response to display on Web UI.

Note : I am also having the certificate (jks) for API in SOAP UI. where that certificate will I configure?

Please help me as I am very new in this area.

Below is the request and response.


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v="abc.com" xmlns:v1="abc.com">
            <v1:serviceId>ARI_sis_${=new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(new Date())}</v1:serviceId>
            <v1:timestamp>${=new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(new Date())}</v1:timestamp>
            <v1:referenceId>ARI_rid_${=new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(new Date())}</v1:referenceId>

Open in new window

HI All,

We have got stuck at a task to convert csv to xml conversion. we have tried some VB script solution but that din't worked out.
PFA sample csv and sample xml output as required.sample1.csvsample1.xlsx
I am trying to add a header and tabs with info about the XML data file to .xml file in SAS code. How exactly this can be done? Please see what I have currently I have for my SAS code. I can see the XML data file as my output but the Header (tab and tab2) with all info about the XML file does not show up yet in the XML file.
libname xmldir xmlv2 '/basepath/examples/XMLData.xml' xmltype=generic;

/* Req. 1: Macro variables to provide appropriate tab spacing. */
%let tab="    ";
%let tab2="        ";

/* Req. 2: XML file information and header*/
data _null_;
   file xmldir;
    put '<?xml version="1.0" encoding="UTF-8"?>';
    put '<Schema Name>';
    put &tab. '<Header>';
    put &tab2. '<SampleDate>2017-06-14</SampleDate>';
    put &tab2. '<CaseCount>30</CaseCount>';
    put &tab2. '<Action>Initial</Action>';
    put &tab2. '<YearPeriod>2017</YearPeriod>';
    put &tab. '</Header>';
    put &tab. '<Payload>';

/* Req. 3: Writing two SAS datsets to xmldir library and creating XMLData.xml data file*/ 
data xmldir.dataname1(label="dataset name1 from sashelp library");
       set sashelp.dataset1(obs=10);

data xmldir.dataname2(label="dataset name2 from sashelp library");
       set sashelp.dataset2(obs=20 keep=var1 var2); 

libname xmldir clear;

/* Req. 4: XML File End*/
data _null_;
   file xmldir mod;

    put &tab'<Payload>';
    put '</Schema Name>';

Open in new window

So, currently only Req. 3 is working.
Any comments or suggestions will be greatly appreciated!
Free Tool: Port Scanner
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

I have task that need me to read an xml file that has been given to me. I've made some research, unfortunately I didn't find one that suit with my needs. I am using javascript to read the xml file. Is there any ways on how can I read the xml file using ftp? Your help is greatly appreciated.
I think I know the answer to my question but I am asking it anyway (I know one is file  - xdDoc.Load and one is string xdDoc.LoadXml etc)
I have a variable that contains an XML formatted string.
Normally I would load XML from a file, using the following code:
	set xdDoc = Server.CreateObject("MSXML2.DOMDocument.6.0")

Open in new window

But the foregoing code fails when I use a XML string.
The following code works for the XML string and why is that??
AM I using the correct version for "Microsoft.XMLDOM"
I know I am okay with "MSXML2.DOMDocument.6.0"

   set xdDoc = CreateObject("Microsoft.XMLDOM") 

Open in new window

We are in the process of rolling out Microsoft Enterprise Mode Site List Manager to our enterprise environment, but we were curious if it is possible to specify in the Enterprise Mode list that a URL/Domain can be opened with either IE11 or Edge?  The Enterprise Mode Site List Manager GUI allows to select either IE11 or Edge, but I was curious if there was a hidden syntax we could update the Enterprise Mode - XML file to allow both browsers to be used for a certain URL?
  Using Access 2016   My xml ribbon is giving me an error on the line with :  SaveObjectAs, FileSaveAsCurrentFileFormat, FileOpen, TabNew, FileExit)
     Do not get these errors in 2010…
    Column: 14
    Error Code Ox80004005
    Failed to find Office control by ID
    ID: SaveObjectAs
Here is part of the  XML file:    
<tab idMso="TabInfo" visible="false"/>
    <tab idMso ="TabOfficeStart" visible="false"/>
    <button idMso="SaveObjectAs" visible="false"/>
    <button idMso="FileSaveAsCurrentFileFormat" visible="false"/>
    <button idMso="FileOpen" visible="false"/>
    <button idMso="FileCloseDatabase" visible="false"/>
    <tab idMso="TabRecent" visible="false"/>
    <tab idMso="TabNew" visible="false"/>
    <tab idMso="TabPrint" visible="false"/>
    <button idMso="FileCloseDatabase" visible="true"/>
    <tab idMso="TabHelp" visible="false"/>
    <button idMso="ApplicationOptionsDialog" visible="false"/>
    <button id = "OpenMainMenu" imageMso ="FileOpenDatabase" label = "Return to Main Menu" onAction = "OnButtonPress"  tag="MainMenu"/>    
    <button idMso="FileExit" visible="false" />


I checked a selfmade ebook with epub validator and it gives many errors:

ERROR      OEBPS/Text/KINDLE FINAL JUNE 2017_split_000.htm      36      2      Error while parsing file 'text not allowed here; expected the element end-tag'.
FATAL      OEBPS/Text/KINDLE FINAL JUNE 2017_split_000.htm      36      18      Fatal Error while parsing file 'The prefix "W" for element "W:WordDocument" is not bound.'.
ERROR      OEBPS/Text/KINDLE FINAL JUNE 2017_split_000.htm      -      -      Error while parsing file 'The prefix "W" for element "W:WordDocument" is not bound.'.

  <w:ActiveWritingStyle Lang="EN-GB" VendorID="64" DLLVersion="131078"
  <w:ActiveWritingStyle Lang="EN-US" VendorID="64" DLLVersion="131078"
  <w:ActiveWritingStyle Lang="DE" VendorID="64" DLLVersion="131078" NLCheck="1">1</w:ActiveWritingStyle>

I would appreciate some help.


I am updating an XML file and using XML::LibXML

My attribute value that I am replacing is

DESCRIPTION="== Conversion Messages Start ==&#xA;&#xA;Message ID : INF11004 (31284-19308)&#xA;Description : An empty RBC is added..&#xA;&#xA;== Conversion Messages End ==&#xA;FTP to FTP"

When i try to substitute using the following code the data is not changed.
just trying to move the last line to the beginning line.

$AA =~ s/(.*)== Conversion Messages End ==(.*)/$2 $1== Conversion Messages End ==/;

Output is

== Conversion Messages Start ==

Message ID : INF11004 (31284-19308)
Description : An empty RBC is added..

 == Conversion Messages End ==

where it should be

== Conversion Messages Start ==

Message ID : INF11004 (31284-19308)
Description : An empty RBC is added..

 == Conversion Messages End ==

I believe its due to the line endings which is causing it to not get the first (.*)

not sure how to get the correct output.

Thanks for the help






Articles & Videos



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