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

Hello,

I need help modifying my WordPress XML feed.   Currently, I am using the WP Job Manager plugin, and have a custom rss feed for a client.

For one of the fields,  they require only the city, but it outputs as city, state, country. see below.

<cityHiring>
<![CDATA[ Wheatland, WY, United States ]]>
</cityHiring>

Changed to this:
<cityHiring>
<![CDATA[ Wheatland ]]>
</cityHiring>

So basically i need everything after and including the first, to be removed.

In the theme code, the field has this PHP
echo $the_job_location;
				?>
		</city>

Open in new window

0
Learn SQL Server Core 2016
LVL 12
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Hell Experts

I Have an xml to xml conversion where i need to copy entire xml As it is but need to strip hypen from bank account numbers and # from Address.

To explain it clearly attached is the source xml. I want the target to be exactly same except that i want to avoid # in field StrtNm (address field) and - in  <Othr/Id>618-401517-001</Id></Othr> (bank account field).

Bottom line is Street address from below part of xml has #. I want that to be stripped

 <PstlAdr>
                  <StrtNm>3 Killiney Road, #07-01 Winsland House I</StrtNm>
                  <PstCd>239519</PstCd>
                  <TwnNm>Singapore</TwnNm>
                  <Ctry>SG</Ctry>
  </PstlAdr>

And bank account no (618-401517-001) form below part of xml has '-' I want that to be stripped.

<CdtrAcct>
               <Id>
                  <Othr>
                     <Id>618-401517-001</Id>
                  </Othr>
               </Id>
               <Tp>
                  <Cd>SACC</Cd>
               </Tp>
               <Ccy>SGD</Ccy>
               <Nm>Winsland Investment PTE LTD</Nm>
            </CdtrAcct>


Below is the code i am using at them moment to copy xml as it is. Can any one please update below code to accomplish above.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:wd="urn:com.workday/bsvc"
    xmlns:etv="urn:com.workday/etv" …
0
Hi Experts,

I'm looking for a xml parser that can extract part(s) of a large xml file.
I'd give a pattern to search and start/end tag.
For each match the entire chunk between start/end  should be selected/printed.

I work on aix machine which has no xml tools installed, that's why I was thinking if there's a windows software that can do that.
I 'd rather have a unix solution though, I know sed can print lines between tags:

perl -ne 'print if /<JOB/ .. /<\/JOB>/' < xml.file >> outfile

But what I miss is that it should only return those chunks that have my search pattern in them.

I attache a sample xml file.
Search pattern= <ReqdColltnDt>2019-01-08</ReqdColltnDt>
Start tag= <DrctDbtTxInf>
End tag =  </DrctDbtTxInf>

There's only one of that pattern in the sample file,

Thanks for your help.
Watnog
sample.xml
0
Dear Experts,
I use below code to select the merchants to display them on the map.

If I select the 15-20 data the result shows up, but if I select more than 20 data the below xml code is not working.

I don't understand why it is not working with more than 20 data?
What do you suggest I should do?

what I need is to show it with XML.
thank you


$mysqli->query("set names utf8mb4");

$sql = "I select here the merchants";

$res = $mysqli->query($sql);

$xml = new XMLWriter();

$xml->openURI("php://output");
$xml->startDocument();
$xml->setIndent(true);

$xml->startElement('markers');

while ($row = mysqli_fetch_assoc($res)) {
  $xml->startElement("marker");

 $xml->writeAttribute('id', $row['uid']);
  $xml->writeAttribute('name', $row['isim']);
 $xml->writeAttribute('address', $row['adres']);
  $xml->writeAttribute('lat', $row['lat']);
  $xml->writeAttribute('lng', $row['longt']);
  $xml->writeAttribute('type', $row['bayituru']);
  //$xml->writeRaw($row['lng']);

  $xml->endElement();
}

$xml->endElement();

header('Content-type: text/xml');
$xml->flush();
0
I am creating a clone of Discogs to help me learn database design. I'm building it by scratch in PHP with no frameworks so far.

I downloaded an XML file of their database. I have a 40GB XML file on my computer.

How would I go about parsing a XML file that is this large?
0
Hi this is a follow on from here  and other questions relating to parsing XML with C#

I'm trying to add a new season to the xml

My CheckSeason fails where no season exists eg for "A Discovery Of Witches"  but returns true or false for any MacGyver season

I'm assuming it's because the parent "season" has to exist before you can check for season number?
I don't understand why this causes an "unhandled exception " and not just return null


AddSeason i've tried to amend from previous question  but i'm missing something

Logic
Add season if none exist
Add new season in numerical  SeasonNumber order


       public static XDocument xdoc = XDocument.Load(@"J:\Media\TV\TV.xml");
        // Load the XML Document using Linq to XML


            if (CheckSeason("A Discovery Of Witches", "S01", "77236"))  // fails
            //    if (CheckSeason("MacGyver 2016", "S02", "67133"))        // works
                {
                Console.WriteLine("Exists");
            }
            else
            {
                Console.WriteLine("Does Not Exists");
                Console.WriteLine("Add Season");
                AddSeason("A Discovery Of Witches", "S01", "77236");
            }


        private static void AddSeason(string showname, string season, string TMDBid)
        {
            char[] array1 = { 's', 'S', '0' 

Open in new window

0
Using XML Linq  how do I add a new  TV show to the attached XML TV.xml preferable so the show.names are in alphabetical order?

From MyForm I call Thus

xmlFuncs.AddShowName(ShowName, FolderName, TMDBid, Xdoc);

Open in new window

or

xmlFuncs.AddShowName("Charmed", "Charmed 2018" "79611", Xdoc);

Open in new window


this creates
NewShow = {<Show>
  <Name>Charmed</Name>
  <FolderName>Charmed 2018</FolderName>
  <TMDBid>79611</TMDBid>
</Show>}

Open in new window




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

namespace TVDB
{
    class XMLFuncs
    {
        public XDocument Xdoc;


        public XDocument LoadXML(string XMLpath)
        {
            if (File.Exists(XMLpath))
            {
                Xdoc = XDocument.Load(XMLpath);
                return Xdoc;

            }
            else
            {
                return null;
            }
        }
        public string ChecKShowName(string FolderName, XDocument Xdoc)
        {

            // // Checks for the existence of a Show and return it's TMDB ID
            var results = (from node in Xdoc.Descendants("Show")
                           where node.Element("FolderName").Value == FolderName
                           select node.Element("TMDBid").Value).FirstOrDefault();
            if (results != null)
            {
                return results;
            }
            else
 

Open in new window

0
I'm trying to use code that I don't understand to gather statistics about myself from experts-exchange. The code begins with the following. Note the cryptic comment at line 12. In any case when I run the code and enter https://www.experts-exchange.com in the input box I get an "A security error occurred" error at line 26. What am I doing wrong?
Private Sub HTML_VBA_Excel()
    Dim oXMLHTTP As Object
    Dim sPageHTML  As String
    Dim sURL As String
    Dim intName As Integer
    Dim intEnd As Integer
    Dim strParts() As String
    Dim strStartString As String
    Dim intNewLine As Integer
    Dim lngLastRow As Long
    Dim lngRow As Long
 '  doesn't work correctly
    Application.ScreenUpdating = False
    Columns("A:B").ClearContents
    strStartString = "target=" & """" & "_blank" & """" & ">"
   
    sURL = "Start"
    Do While sURL <> ""
        sURL = InputBox("Enter search result URL")
    
       'Extract data from website to Excel using VBA
       Set oXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")
'       oXMLHTTP.Open "GET", sURL, False
       oXMLHTTP.Open "GET", sURL, False

       oXMLHTTP.send
       sPageHTML = oXMLHTTP.responseText

Open in new window

0
Dear Experts,

with below code I select the data from my table and show it on the google maps.

my link is like this: xml.php?birinci=2018-12-12&ikinci=2018-12-29&satisci=me
this link works perfectly fine

however this link is not bringing any data althoug there is data.
xml.php?birinci=2018-12-11&ikinci=2018-12-29&satisci=me

I don't understand why it is not working with diffrent date? what do you think I should do?

my code is below


$birinci= $_GET["birinci"];
$ikinci= $_GET["ikinci"];
$satisci= $_GET["satisci"];

$birinci = date("Y-m-d", strtotime($birinci));
$ikinci = date("Y-m-d", strtotime($ikinci));


// CONNECTION AND SELECTION VARIABLES FOR THE DATABASE


// OPEN A CONNECTION TO THE DATA BASE SERVER


// DID THE CONNECT/SELECT WORK OR FAIL?

$mysqli->query("set names utf8mb4");

$sql = "SELECT * FROM mytable WHERE tarih between '$birinci' AND '$ikinci' AND uid='$satisci' and lat is not Null order by id asc ";

$res = $mysqli->query($sql);

$xml = new XMLWriter();

$xml->openURI("php://output");
$xml->startDocument();
$xml->setIndent(true);

$xml->startElement('markers');

while ($row = mysqli_fetch_assoc($res)) {
  $xml->startElement("marker");

 $xml->writeAttribute('id', $row['id']);
  $xml->writeAttribute('name', $row['adi']);
 $xml->writeAttribute('address', $row['tarih']);
  $xml->writeAttribute('lat', $row['lat']);
  $xml->writeAttribute('lng', $row['lng']);
  $xml->writeAttribute('type', $row['bayikodu']);
  

Open in new window

0
I'm not sure anyone can help since this is just a unique set up, but I'm hoping someone can shed some light on this issue.  I have a batch file that runs an MSBuild.exe command and then runs some xUnit tests using the xunit.console.x86.exe application.  I'm running five different commands similar to the one below.

C:\Users\sve\.nuget\packages\xunit.runner.console\2.4.1\tools\net472\xunit.console.x86.exe C:\SDS_IT\build\BuildTests\bin\Debug\BuildTests.dll -xml C:\xunit-test-results\build-test-result.xml

So the command runs some tests and then puts the output it an XML file.  If I run the batch file manually through a command window or through a PowerShell window, it runs fine every time.  But if I set a scheduled task to run this batch file, the task will successfully run two times in a row, but then on the third time, it hangs on the longest xUnit test.  I don't understand how it runs fine a couple of times and then it hangs on the third time.  I have tried this many times and this is always the case.  The scheduled task is set to run every hour.

Please let me know if you have an insight!  Ask any questions you may have!

Thanks in advance!
0
CompTIA Network+
LVL 12
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

Hello Experts.

I've been working on learning how to read and write from/to a custom XML file within my vb.net project.

At this point, it works, but only knows how to replace the entire file on the write operation. Let me explain...

I have a Public Class UserPrefs which iterates eight items that the user can maintain via checkboxes on a small dialog. Let's say for the moment that if the user clicks "AutoSelect", my setXML subroutine successfully creates the UserPreferences.xml file in bin/debug with the one line <AutoSelect>True</AutoSelect>. Next, the user unchecks "Countdown", so my setXML happily re-creates UserPreferences.xml with the line <Countdown>False</Countdown> sending AutoSelect to bit heaven. My desire is that I can keep track of all eight items. Any thoughts on what I might be doing wrong?

Imports System.Configuration
Imports System.IO
Imports System.Xml.Serialization
Imports SNAP.GlobalVars

Public Module iXML

    Sub setXML(ByVal SetKey As String, ByVal SetVal As String)
        Try
            Dim xmlFile As New StreamWriter(xmlPath)
            Dim xmlWriter As New XmlSerializer(GetType(UserPrefs))
            Dim xmlSetKey As New UserPrefs
            Select Case SetKey
                Case "AutoSelect" : xmlSetKey.AutoSelect = SetVal
                Case "Countdown" : xmlSetKey.Countdown = SetVal
                Case "LagPrompt" : xmlSetKey.LagPrompt = SetVal
                Case "MyTeam" : xmlSetKey.MyTeam = SetVal
                Case 

Open in new window

0
I'm looking for an expert to help me understand DMARC reports.  I believe I understand the concepts of DMARC, DKIM, etc. and have set everything up properly.  I'm receiving the DMARC reports and have also setup a free DMARCIAN account.  I've been review the data in there and between that interface and looking at the XML reports in Excel, I'm just not putting it all together.  Ideally, I'm looking to hire an expert that can get on the phone with me to help me understand these reports and answer some questions I have.  I have a very good understanding of email, DNS, etc. but just can't figure out these reports.  Someone that understands DMARCs very well would be a great fit for this.

thank you!
0
Hi,

It has been a long while since I have had to do this and was hoping someone could help me out.

basically I am getting returned this xml packet:
<?xml version="1.0"?><BCAmessage service-request-id="10630513389" type="RESPONSE"><BCAservices><BCAservice><BCAservice-code>BCA001</BCAservice-code><BCAservice-code-version>V00</BCAservice-code-version><BCAservice-client-ref>1 </BCAservice-client-ref><BCAservice-data><response version="1-36-0">
<enquiry-report>
<primary-match type="no-match"/>
<general-message>NO EXISTING FILE FOUND FOR THE SUBJECT OF YOUR ENQUIRY</general-message>
<summary-data>
<summary currency-code="AUD" name="enquiry-amount" type="amount">0</summary>
<summary name="age-of-file" type="months"/>
<summary name="age-of-subject" type="years"/>
<summary name="time-at-address" type="months"/>
<summary name="time-at-employer" type="months"/>
<summary name="defaults" type="count">0</summary>
<summary currency-code="AUD" name="defaults-value" type="amount">0</summary>
<summary name="defaults-paid" type="count">0</summary>
<summary name="defaults-12" type="count">0</summary>
<summary name="defaults-12-paid" type="count">0</summary>
<summary name="defaults-12-unpaid" type="count">0</summary>
<summary name="defaults-24-paid" type="count">0</summary>
<summary name="defaults-24-unpaid" type="count">0</summary>
<summary name="defaults-36-paid" type="count">0</summary>
<summary name="defaults-36-unpaid" type="count">0</summary>
<summary 

Open in new window

0
Hi This is following on from here

As a learning exercise I'm retrieving and updating an XML file of TV show  information  

It occurred to me that it's possible to have multiple seasons to the same TV show so I adjusted the XML accordingly
TV.XML
<?xml version="1.0"?>
<TV>
  <Show>
      <Name>MacGyver 2016</Name>
      <FolderName>MacGyver 2016</FolderName>
      <TMDBid>67133</TMDBid>
      <Season>
        <SeasonNumber>3</SeasonNumber>
        <Episode>
          <EpisodeNumber>1</EpisodeNumber>
          <EpisodeName>Improvise</EpisodeName>
          <BackDrop>https://image.tmdb.org/t/p/w350_and_h196_bestv2/eQMVJkBltvID73sh9vvTistssS6.jpg</BackDrop>
          <FullPath>J:\Media\TV\MacGyver (2016)\S03\Macgyver.2016.S03E01.Improvise.mp4</FullPath>
        </Episode>
      </Season>
      
  </Show>
</TV>

Open in new window


Of course this broke the LINQ query from the previous so answer

How do adjust the select query bellow to retrieve Episode data which is now nested in Season?

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

namespace XmlReader
{
    class Program
    {
        static void Main(string[] args)
        {
            // Load the XML Document using Linq to XML
            var xdoc = 

Open in new window

0
Hi All,

I am working on an xslt which should transform XML to space separated flat file. I was able to do xslt which essentially as per requirement is space delimited and restricts record to 300 characters.

My output at the moment is

003339334070 0000554509 0000000200 10192018 EUNICE PRICE
003339334070 0000554510 0000005750 10192018 M3 USA Corporation
003339334071 0000554509 0000000300 10192018 EUNICE PRICE
003339334071 0000554510 0000005700 10192018 M3 USA Corporation

But vendor came back with new requirement to add another record which should be sum  total amount and count the line items. For example I need the data like below. Where 2 is number of lines and 003339334070 is feild wd:CF_Account_number_HSBC_Canada from source. This field is also key to group the records. And  0000005950 is sum of two totals.

003339334070 0000554509 0000000200 10192018 EUNICE PRICE
003339334070 0000554510 0000005750 10192018 M3 USA Corporation
003339334070 2                     0000005950
003339334071 0000554509 0000000300 10192018 EUNICE PRICE
003339334071 0000554510 0000005700 10192018 M3 USA Corporation
003339334071 2                     0000006000

I am attaching the XSLT and XML i am using for testing. Can some one please help me to achieve above result? I am new to XSLT and learning.

Thanks & Regards,
Sridhar
XSLTHELP.xsl
pp2.xml
0
I have a dynamic web project ( SOAP web service), which takes parameters from a received message and inserts data to oracle db. This all works fine. However, db connection url, password and user are hardcoded.

This web app will be distributed to a number of servers with different db connection details, so it can't be hardcoded and generating a new app for each server is not an option.

I wonder if I could store needed info in an xml file and read from there. Is someone able to give me a nice simple example of how to do it?

Also, where such file would have to be placed, bearing in mind it would have to be possible to edit it after the deployment?
0
Is there a way to convert a scan document PDF to XML 2.6? I tried to convert it using Adobe Acrobat, Save as XML format, but it saved as XML 1.0.
0
Hi

Using the XML file bellow as a log I'm gathering information about TV shows using TMDB api (Not part of question just background)

How do I access each show name and its childs episodes details?

Ultimately I want to be able to access a  Episode path and if doesn't exist in the xml create a new entry or parent show

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

namespace XmlReader
{
    class Program
    {
        static void Main(string[] args)
        {
            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.Load(@"J:\Media\TV\TV.xml");
            XmlNodeList Nodes = xmlDoc.SelectNodes("TV/Show");
            for(int I =0; I <= Nodes.Count; I++)
            {
                Console.WriteLine(Nodes[I].Name); // This throws an error 
            }

            Console.ReadKey();
        }
    }
}

Open in new window


TV.xml

<?xml version="1.0"?>
<TV>
  <Show>
      <Name>MacGyver 2016</Name>
      <FolderName>MacGyver 2016</FolderName>
      <TMDBid>67133</TMDBid>
      <Season>3</Season>
      <Episode>
          <EpisodeNumber>1</EpisodeNumber>
          <EpisodeName>Improvise</EpisodeName>
          <BackDrop>https://image.tmdb.org/t/p/w350_and_h196_bestv2/eQMVJkBltvID73sh9vvTistssS6.jpg</BackDrop>
      <FullPath>J:\Media\TV\MacGyver (2016)\S03\Macgyver.2016.S03E01.Improvise.mp4</FullPath>
      </Episode>
  </Show>
</TV>

Open in new window



I'm assuming I would create a new episode by appending to it's parent show (something like bellow) but how do I find the correct show / season
Similarly How do create  a new show?

XmlNode EP = xmlDoc.CreateElement("Episode");
            XmlNode EpNum = xmlDoc.CreateElement("EpisodeNumber");
            EpNum.Value = "2";
            EpNum.AppendChild(EP);
            // repeate for each element

Open in new window

0
Hello,

I generated soap web services using Eclipse JEE, which then I deployed ( .war) on Tomcat 7.0 on Centos 7 -  this works fine.
The aim is to insert a data received in an xml and insert it to an Oracle table.

I've added the below code to a java class file, which meant to do some insert statement ( which is valid ) , with hardcoded values, just to prove I can do it.

    public void InsertValue(String MessageId, String value){
    	try{

    	Connection con=null;
    	Class.forName("oracle.jdbc.driver.OracleDriver");


    	con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xxx", "xxx","xxx");
    	Statement s = con.createStatement();

    	s.execute("INSERT INTO ping_message (message_id,dstamp) VALUES ('1',To_char(SYSDATE))");
    	con.setAutoCommit(true);
    	s.close();
    	con.close();
    	}catch(Exception e){
    	System.out.println("ERROR: "+e.getMessage());
    	}
    	}
    

Open in new window


Unfortunately, this does not work. I wonder if this is because of the java code or Tomcat needs some db drivers in order to establish a connection the database ?

btw, my java skills are being developed as I type this :)
0
Angular Fundamentals
LVL 12
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

Msg 2370, Level 16, State 1, Line 30
XQuery [value()]: No more tokens expected at the end of the XQuery expression. Found '1'.

Getting this error above when I do this select statement below.  Is there a better way to fix this XML PATH statement?
Thanks.
(Using Sql Server 2016)

select 7271 container_id into #cr_containers

(SELECT
      Stuff((
            SELECT N',' + cast(container_id as nvarchar(50))
            from #cr_containers
            FOR XML PATH(''),TYPE
      ).value('text()1','nvarchar(max)'),1,1,N''));
0
Hi all, hoping one of you Gurus can assist please.

I have been using a payment system for many years but they have now changed one of their SOAP calls to an external URL. For the life of me I'm unable to connect without the following error:

"cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None). "

these are the binding info from their App.config file if it helps
<bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IPortalService">
          <!-- Transport security is only required when the portal service is running under https, for http this should be set to None -->
          <security mode="Transport" />
        </binding>
      </basicHttpBinding>
    </bindings>

Open in new window


I'm using PHP7 and have free run on the server to implement any of your suggestions. Previously I used cURL to simply create the SOAP XML, post if off and grab the response but having no luck here.

I cant post all the login details etc as it's payment and site specific but I'm after being initially able to at least connect to the SOAP URL below, and get a more valid error (for example, invalid user logon) etc.

Ok, here's the details:

https://pay360sc.e-paycapita.com/LivePayments242/PortalService.svc?wsdl

Action required is "Invoke" for which I believe the following should be the right XML to be sent:


Open in new window

0
I have an OData query to get a historical list of HDX sessions (username, start/end times, protocol, Delivery Group) from Director. What's the easiest way to extract the data from the XML and produce a simple table of the fields above? I tried using Chrome's Advanced REST Client, but while the XML response came back fine, the client couldn't parse it successfully.
The actual query:
http://ddc.company.com/Citrix/Monitor/OData/v3/Data/Sessions?$filter = StartDate ge datetime'2018-12-02T15:14:49' and StartDate le datetime'2018-12-03T03:14:49' and CurrentConnection/Protocol eq 'HDX'&$select = StartDate,EndDate,CurrentConnection/Protocol,Machine/DesktopGroup/Name,User/UserName,User/FullName&$expand = CurrentConnection,Machine/DesktopGroup,User 

Open in new window

0
Hello Experts,
I have the content of an XML file being shown in a richtextbox (.NET VB)
How can I make it have the color formatting?
Regards,
0
Hi,

How can I change the following code to add a video attribute in the second node of the string.
I want to make sure it appears straight after the image attribute.

Thanks,

Ward.

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

namespace PieXML
{
    class Program
    {
        static void Main(string[] args)
        {
            string xml_data =
@"<?xml version=""1.0""?>
<gameList>
<game>
	<path>./2005 Minigame Multicart (USA) (Unl).zip</path>
	<name>2005 Minigame Multicart (USA) (Unl)</name>
	<image>./boxart/2005 Minigame Multicart (USA) (Unl).png</image>
	<video>./snap/2005 Minigame Multicart (USA) (Unl).mp4</video>
	<releasedate />	
	<developer />
	<publisher />		
	<genre />	
</game>
<game>
	<path>./A-VCS-tec Challenge (USA) (Unl).zip</path>
	<name>A-VCS-tec Challenge (USA) (Unl)</name>
	<image>./boxart/A-VCS-tec Challenge (USA) (Unl).png</image>
	<releasedate />
	<developer />
	<publisher />
	<genre />
</game>
</gameList>
 ";

            XmlDocument doc = new XmlDocument();
            doc.LoadXml(xml_data);

            foreach (XmlNode node in doc.DocumentElement.ChildNodes)
            {
                Boolean video_found = false;
                foreach (XmlNode locNode in node)
                {
                    string node_name = locNode.Name;

                    if (node_name == "video")
                    {
                        

Open in new window

0
I'm having the lot of XSD, which is included with single XSD file and all the files are getting valid well and the corresponding XML file also getting valid against corresponding XSD using oxygen XML editor. But while uploading the xml file against the XSD's file in the product. I'm getting the below error:

    Error resolving component 'Definition.attrib'. It was detected that 'Definition.attrib' has no namespace, but components with no target namespace are not referenceable from schema document

When I opened the corresponding file, it shows validated in oxygen XML editor. Here is the code for the corresponding file:

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema 
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns="http://www.w3.org/1998/Math/MathML"
  targetNamespace="http://www.w3.org/1998/Math/MathML"
  elementFormDefault="qualified"
 >

<xs:include schemaLocation="common-attrib.xsd"></xs:include>
<xs:include schemaLocation="../common/common-attribs.xsd"></xs:include>

<xs:attributeGroup name="mean.attlist">
  <xs:attributeGroup ref="Definition.attrib"/>
  <xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>


<xs:complexType name="mean.type">
  <xs:attributeGroup ref="mean.attlist"/>
</xs:complexType>

<xs:element name="mean" type="mean.type"/>

<xs:attributeGroup name="sdev.attlist">
  <xs:attributeGroup ref="Definition.attrib"/>
  <xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>

<xs:complexType name="sdev.type">
  

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