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


how can i remove a node from html collection xml in javascript
OWASP: Avoiding Hacker Tricks
LVL 13
OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

Hello Experts,
Here is my issue.  I have a MySQL database that a report is being derived from. There is a field in one of the tables that is stored as XML. Previously, an expert gave me some great advice and I was able to create a formula that broke out one of the 3 pieces of data that I need.

StringVar strTest := {_invoice_transaction1.Extra};
ExtractString (strTest,'"CheckDate">',"</v");

While this formula gives me the CheckDate, as I suspected, I could not create a parameter field from the formula.
Unless there is a workaround that I have not yet deduced, my latest attempt is to go to the SQL query and modify the query prior to the data reaching the report.

I know I need to go to: Database:database expert: odbc: add command... and there I can modify the SQL.

So, that leaves me 2 questions: Where and or how can I see the SQL statement output so I know if my modifications are going to have the desired results. If I was using straight SQL I would probably add a line like: ExtractString(_invoice_transaction1.extra, '"Checkdate">',"</") as checkdate     -  to my query which I have copied from Crystal below.

 SELECT _invoice_transaction1.TransactionDate, _customer1.LastName, _customer1.FirstName, _customer1.MiddleName, _insurancecompany1.Name, _invoice1.ID, _invoicedetails1.BillingCode, _user1.Login, _invoice_transaction1.Amount, _invoice_transaction1.Taxes, _invoicedetails1.ReviewCode, _invoice_transactiontype1.ID, _invoice_transaction1.Extra
 FROM   …

How can I take the results of a Linq Query and convert to XML and save to file.

I have provided some same code below.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Linq_Test_1

    class Person
        public string Name;
        public int Age;
    class Program
        static void Main(string[] args)
            List<Person> People = new List<Person>();

            Random rnd = new Random();

            for (int i=1;i<=100;i++)
                Person person = new Person();

                person.Name = "Name" + i.ToString();                
                person.Age = rnd.Next(1, 101);

            int counter = 1;
            var results = from Person in People orderby Person.Age descending
                         select new
                             Name = Person.Name,
                             Age = Person.Age,
                             Index = counter++ 


Open in new window

dear all

i have a xml file
var m_XML_segments_Grid =  ($.parseXML(m_result_segments_Grid); where m_result_segments_Grid is an string
and m_XML_segments_Grid_str = new XMLSerializer().serializeToString(m_XML_segments_Grid);
contain the below :
"<NewDataSet>↵  <DsResQuery>↵    <SEQ>2</SEQ>↵    <SEGMENTNBRE>Segment #1</SEGMENTNBRE>↵    <P_SEGID>1</P_SEGID>↵    <CBOIN>08:00</CBOIN>↵    <CBOOUT>13:00</CBOOUT>↵    <DATE_TIME_STR>09/02/2019</DATE_TIME_STR>↵    <P_DESC>Segment 1 desc</P_DESC>↵    <P_DSCHEMA>8</P_DSCHEMA>↵    <P_WRKSTAT>0</P_WRKSTAT>↵    <P_PRESENT>1</P_PRESENT>↵    <P_STATUS_DAY>0</P_STATUS_DAY>↵    <P_FLOAT>0</P_FLOAT>↵  </DsResQuery>↵  <DsResQuery>↵    <SEQ>3</SEQ>↵    <SEGMENTNBRE>Segment #2</SEGMENTNBRE>↵    <P_SEGID>2</P_SEGID>↵    <CBOIN>14:00</CBOIN>↵    <CBOOUT>17:30</CBOOUT>↵    <DATE_TIME_STR>09/02/2019</DATE_TIME_STR>↵    <P_DESC>Segment 2 desc</P_DESC>↵    <P_DSCHEMA>8</P_DSCHEMA>↵    <P_WRKSTAT>0</P_WRKSTAT>↵    <P_PRESENT>1</P_PRESENT>↵    <P_STATUS_DAY>0</P_STATUS_DAY>↵    <P_FLOAT>0</P_FLOAT>↵  </DsResQuery>↵</NewDataSet>"

Open in new window

i need to add row to this xml and delete row from this xml how to do it?
Hi Experts:
So I'm not super with Crystal Reports... let's start there.

I have a memo field that is stored as XML.
I need to parse the XML and pull 3 variables for one for Checknumber, one for checkdate, and one for paid.

Here is part of the problem. Some data sets contain the 3 variables, some don't, some data sets are null (no data at all).
Here are 2 sample pieces of data.

  <v n="Billable">50</v>
  <v n="CheckDate">04/29/2019</v>
  <v n="CheckNumber">12</v>
  <v n="Paid">35</v>
  <v n="PaymentMethod">Check</v>

  <v n="Billable">3617.85</v>
  <v n="Paid">500</v>
  <v n="PaymentMethod">Cash</v>

Ultimately, the goal is to have a formula and to be able to search for the CheckDate, CheckNumber, or Amount.
At this point, I am not certain that even If I can isolate the variables, that the variable can be made into parameters for searching...

I have researched and attempted various string variables but without success.

I have the following json_decode data :

    [metadata] => Array
            [result] => 1
            [version] => 1
            [command] => listzones
            [reason] => OK

    [data] => Array
            [zone] => Array
                    [0] => Array
                            [zonefile] => mybrand.asia.db
                            [domain] => mybrand.asia

                    [1] => Array
                            [domain] => mybrand.my
                            [zonefile] => mybrand.my.db




Open in new window

May i know how to manipulate the data ?


1. How to get "mybrand.asia" or "mybrand.my.db" output ?

2. How to loop each data in foreach ?

Appreciates anyone assistant on this.

Thank you.
Hello,  I'm having an issue with a vendor,  regarding post titles in an XML feed we are sending them.

The majority of the post titles are like this below.
6-Day, Chocolate Dedicated Class A Driving Job – Hannibal, MO

They (vendors) want us to eliminate the city, state from the title.  so would be just
6-Day, Chocolate Dedicated Class A Driving Job

We have over 2500 jobs, with titles like that. So, is it possible to truncate the title in the feed, so it outputs everything up to the -

Below is the template i created, and the actual feed url is here
* Template Name: Custom RSS Template - sptshafferfeed
$postCount = 500; // The number of posts to show in the feed
$cacheFile = "wp-content/themes/enfold/rsscache/sptshafferfeed.rss";


$posts_per_page = 50;
$paged = 0;
$theres_more = true;
$rss_items = array();
if(file_exists($cacheFile) && !isset($_GET["reset"]))
  $rss_items = json_decode(file_get_contents($cacheFile),true);
  if($rss_items == null) { $rss_items = array(); }

$charset = get_option( 'blog_charset' );
header( 'Content-Type: ' . feed_content_type( 'rss-http' ) . '; charset=' . $charset, true );
<?php echo '<'.'?xml version="1.0" encoding="utf-8"?'.'>'; ?>
<title><?php bloginfo_rss( 'name' ); ?> - SmartPhoneTrucker - Shaffer Trucking Job Feed</title>
<link><?php bloginfo_rss('url'); ?></link>

Open in new window

I have a text string like this:
"stuff<offset>1234</offset><length>78</length>stuff <offset>1000134</offset><length>5678</length>stuff...<offset>11234</offset><length>5678</length>stuff"

Open in new window

My goal is to find the largest offset value and the corresponding length value.

I know I can write a loop searching for each "<offset>" and extract the value. I was wondering if in python3.7, there is a non-loop approach. (I can  use existing xml parsing code, but this seems simple enough to just use the text string.)

As far as I know, in XML we use the following XML Escape characters to convert the same from Excel formula to XML Formula for use in XML files.

" with & quot;
> with & gt;
< with & lt;
& with & amp;
' with & apos;

Now what is the XML equivalent of following in Excel

<> (Not equal to
>= (Greater than or equal to)
<= (Less than or equal to)

Whether there are any other such characters ?

Is there any specific way of representing / rewriting Excel Formula to XML Formula ?

In addition to above, as an example What would be the XML equivalent of the following formula in Excel ?

=IF(OR(B1<>"Receipt",K1<>"Advance",LEN(TRIM(AQ1))=0),"","Advance Receipt")

I'm new to oracle , if one has  to save XML in Oracle datatype ( 11 or higher) , is there a XML datatype in oracle?
Why Diversity in Tech Matters
LVL 13
Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.

I am trying to create an xml file via vbscript.  I can create the file but it inserts xmlns="" on each child element and it is all on one line when you open it with notepad.

I would like the output to look like the attached picture

 Here is my code:

scriptDir = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
Set xmlDoc = CreateObject("Msxml2.DOMDocument.6.0")
Set objRoot = xmlDoc.createElement("CloudEditSettings")
Set xmlns = xmlDoc.createAttribute("xmlns")
xmlns.text = "http://springcm.net/schemas/cloudedit/config/v1"
Set xmlnsxsd = xmldoc.createAttribute("xmlns:xsd")
xmlnsxsd.text = "http://www.w3.org/2001/XMLSchema"
Set xmlnsxsi = xmldoc.createAttribute("xmlns:xsi")
xmlnsxsi.text = "http://www.w3.org/2001/XMLSchema-instance"

objroot.setAttributeNode xmlnsxsi
objroot.setAttributeNode xmlnsxsd
objRoot.setAttributeNode xmlns
xmlDoc.AppendChild objRoot

Set objAuto = xmlDoc.createElement("AutomaticUpdates")
objAuto.text = "true"
objRoot.appendchild objAuto

Set objDiag = xmlDoc.CreateElement("IsDiagnosticLoggingEnabled")
objDiag.text = "false"
objRoot.appendchild objDiag

Set objEmail = xmlDoc.CreateElement("Email")
objEmail.text = "emailaddress.com"
objRoot.appendchild objEmail

Set objAccountID = xmlDoc.CreateElement("AccountID")
objAccountID.text = "11111"
objRoot.appendchild objAccountID

Set objUseSpringCM = xmlDoc.CreateElement("UseSpringCM")
objUseSpringCM.text = "false"
objRoot.appendchild objUseSpringCM


Open in new window


I am bringing in an xml file into word to create a report. This is being done using a plugin from oracle called BI Publisher.  I believe you do not need to be familiar with this to answer my question.

The field I am trying to display is a blob - Employee Photo. In Microsoft word's properties the text form field is a 'regular text with maximum length - unlimitted.

The image is being displayed in a column of a table.  When the employee has no photo, huge blank spaces result. ie the table rows span many pages with no data.

The xml handling this field, employee photo,  in the plug is :
 <fo:instream-foreign-object content-type=”image/jpg” height=”70 px” width=”55 px”><xsl:value-of select=”B.EMPLOYEE_PHOTO”/></fo:instream-foreign-object>

So my questions are :
1. Should the Blob be interpreted as numeric or text?  When I change the photo field to numeric, the report format is fine.  However, you get the photo displaying with numbers and people without photo's are blank but do the table rows spanning many pages.

2. Can I wrap the xml statments to ignore displaying  B.EMPLOYEE_PHOTO is blank and how would I do this?

Thanks, BrockThis is the field placements.  You see the postion of the Employee photo in yellow highlightsThe xml code behind the Employee photo fieldThe actual field coming in from the xml fileWhat the report diplays like when the employee photo is numericWord showing type of field
I have an xml declared as:
declare @xmlIndata xml = '<root>
  <Period />
  <Filters />

Open in new window

I want to extract the subtree starting at the node <Variables>.  So some xml manipulation to extract the subtree and set it to @variables. Like:

declare @variables xml
set @variables = somehow select the subtree 'Variables' from xmlIndata;

Then @variables should be:
 ' <Variables>

Open in new window

seems pretty basic to be able to extract part of an xml but i cant find out how to do it.
Hi Experts,

Firstly thank you for taking a look at my question.

I am trying to access the details of xml where the attribute = Yes.

I am trying this but it is not quite correct:

$bestmatchIndAddress = $xml->soapBody->Response->BestMatch->IndividualDetail->ContactDetails->AddressDetails['Current=Yes'];

many thanks for your help!!
Hi Experts!

Firstly thank you for taking a look at my question.  I am having a shocking morning and can't for the life of me work out how to get the details out of the XML data.

given this XML:

  object(SimpleXMLElement)#2 (1) {
    object(SimpleXMLElement)#3 (5) {
      array(2) {
        string(3) "1.0"
        string(1) "T"

How do I access the Version and Environment data?

This is what I am trying -

        $xml = new SimpleXMLElement($response);
      $consumer = $xml->xpath('//Response/Version');
      echo "<br><Br>Consumer:".$consumer;

I have worked with this before but am having a brain block this morning.

This is the current response.

Notice: Array to string conversion in C:\xampp\htdocs\illion\illion v2.php on line 55

many thanks for you help!!!
Hi Experts,

Firstly thank you for taking a look at my question!

Using PHP i need to access the xml body inside a soap packet.

the soap response looks like this:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
        <Response   Version="1.0" Environment="T" xmlns="http://www.dnb.com.au/Schema/CCB/1.0">
            <ConsumerHeader SegId="ERHD01" InternalReference="M20190912095903-023-000238" EnquiryType="1" UniqueCustomerReference="Test" ConsumerId="2190130" Country="AU" ProductCode="AMD3" NewFileCreated="0" IsMinor="0" HasSummary="1" HasJudgment="1" HasBankruptcy="1" HasSummons="1" HasOtherPublicRecord="0" HasDirector="0" HasFileNote="0" HasDefault="1" HasEnquiry="1" HasError="0" HasWarning="0">
                <EnquiryDate Year="2019" Month="9" Day="12" />
            <BestMatch MatchScore="768">
                <IndividualDetail SegId="ERID01">
                    <DateFirstRecorded Year="2003" Month="6" Day="10" />
                    <Person Sex="U">

Open in new window

I have a XML file that is imported into a field in our SQL2016 DB. The column is type XML.
An example of two records is:

<PatientData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

We are able to either get the Header info to return, the Trailer info to return or the Patient Data to return.  What are we doing wrong? We don't have a lot of experience with XML.
The examples online we are finding aren't helping.

Any assistance is appreciated.
Currently this is what we have:



EXEC sp_xml_preparedocument @hDoc OUTPUT, @XML

HI this is a continuation of thread from before
old thread

the conditions for this project has changed a little rendering the script that Michelangelo had provided no longer useful for my cause although it worked for the previous purpose

heres what changed:
the files in questions are XML format (but are not named .xml they are .901 files)
i need to remove a whole node from the *.xml files ,  including the tag

 <errsql yadadayda > 
random sql error the statement has terminated

this whole line need to be removed form the file

here is a snippet of the xml file:

<chgsql ts="07:01:58.971" op="O" jb="ADD" tb="CLL_TAB" sc="BATCH"> <fld fd="F1000" af="PAL"/>
<fld fd="F1148" af="43000135163"/>
<idx fd="F1577" af="5167599565"/>
<idx fd="F1578" af="LINK"/>
<fld fd="F1001" af="1"/>
<fld fd="F902" af="00003814"/>
<errsql ts="07:01:58.986" op="O" lv="50" ob="">
<sql>INSERT INTO CLL_TAB [F1000,F1148,F1577,F1578,F1001,F902] VALUES [:F1000,:F1148,:F1577,:F1578,:F1001,:F902] </sql>
<chgsql ts="07:01:58.986" op="O" jb="ADD" tb="CLL_TAB" sc="BATCH">
<fld fd="F1000" af="PAL"/>
<fld fd="F1148" af="43000135164"/>
<idx fd="F1577" af="5166282554"/>
<idx fd="F1578" af="LINK"/>
<fld fd="F1001" af="1"/>
<fld fd="F902" af="00003814"/>
I have to update an XML column across several hundred thousand records in SQL Server 2014
I am using a set-based approach as follows:

;WITH XMLNAMESPACES(DEFAULT 'http://www.my-company.co.uk/mcshema1/1.0')
      [Xml].modify ('replace value of (/MC/Family/Parents/Parent[@id={ sql:column("_pc.ParentId") }]/Children/Child[@id={ sql:column("_pc.ChildId") }]/Type)[1]/text()[1] with "Special Child"')
FROM [MC].[Family] C
      FROM #FamilyParent __p
      WHERE __p.[FamilyId] = C.[Id]

but keep getting the error:

Msg 2209, Level 16, State 1, Line 334
XQuery [MC.Family.Xml.modify()]: Syntax error near '{'
PMI ACP® Project Management
LVL 13
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.


I'm new to xml.  May I know whether there exist any xml generator in the market?  No matter it need to pay or it is free of charge.

That is, if I provide the generator all those schema for the xml together with the data that need to be contained in the xml, the generator will generate the appropriate xml out.   Do such xml generator exist in the market?

Kindly please help.

I am trying to fill a combo Box with a list of items from a SQLite DB.
have been using/following with this https://docs.microsoft.com/en-us/windows/uwp/data-access/sqlite-databases#choose-an-abstraction-layer

SO in my
DataAcsess.cs Class i have
 public static List<String> ProductList()

            List<String> entries = new List<string>();

            using (SqliteConnection db =
                new SqliteConnection("Filename=DataStorage.db"))

                SqliteCommand selectCommand = new SqliteCommand
                    ("SELECT DOTProductname from QPL", db);

                SqliteDataReader reader = selectCommand.ExecuteReader();

                while (reader.Read())

            return entries;

Open in new window

(which I am not sure what it is doing)

then i have a

I have my XAML:
                    <ComboBox  x:Name="PName" HorizontalContentAlignment="Center" MinWidth="140" ItemsSource="{Binding}">


Open in new window

(not sure how i get the item source to work)

and finally my

XAML.CS code:
  private void ProductList(object sender, RoutedEventArgs e)
          ComboBox.ItemsSource = DataAccess.ProductList();

Open in new window

Which is throwing some errors because i am not understanding what is required.

How is the standard method to get the query convert it to a item
and then put a foreach item loop to add to my combo box or similar?
appreciate your help in advance.
I re-organized my UWP app. I created a set of folders in the solution explorer and moved the XAML files around accordingly.
I go to recreate my menu items and i run into a trouble where it doesn't recognize some of the new folders and some of the new files.
Is there a way to clean out the old references to make way for a new one? see pictures for details
Hi EE,

This question is more of a query looking for approaches to resolve the following issue:

The user has an SSRS 2016 report and filters the datasets efficiently with filters they have been given.

However, the user wants to save specific rows within the report to key the data into another system e.g Desktop application. Exporting initial the result set data to XML result is a simple task. My question is can you have a button on the SSRS which launches a subform that asks what rows /columns specifically do you want to save from the resultset in XML format.  Completing the necessary criteria on the subform, SSRS exports the data to the user via a download.  

Is this possible in SSRS if so are there examples out there?

Any links or tips, advice are welcome.

Thank you.
THis is a duplicate question that i asked on a reddit subforum.
but without much response.

Iv been looking for weeks to find a comparable guide on using a UWP app with SQLite. All the guides i find are either out of date or using nugget packages that no longer exist. or provide super complex methods.

Im using VS 2019 Community

with this: https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Sqlite/

Trying to connect to a local .DB file

Maybe i am just not googling the correct words?

Does anyone know of a good resource that demonstrates how to connect to a local .DB file submit entry's and retrieve entry's?
I've been following this guide: https://blogs.msdn.microsoft.com/appconsult/2018/05/06/using-the-navigationview-in-your-uwp-applications/

I have my Menu items together and they act great!
However when I open the app I am having trouble setting the default view I have made a homepage when the app opens I would like the homepage to display. When using the code line in the guide it throws an exception. Screenshot:Screenshot--57-.pngHere is the code in the guide:
       if (item is NavigationViewItem && item.Tag.ToString() == "Home_Page")
                nvTopLevelNav.SelectedItem = item;

Open in new window

hopefully its something simple i am doing wrong. my homepage location is Views.HomePage

Screenshot of landing page.
Full code (abit messy i know):

    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

        <NavigationView x:Name="nvTopLevelNav"

Open in new window







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