M
mk834tt
xml rookie. Do custom tags in an xml file need to be lower case?
(answering with an absolute no xlates into my problem. You can skip
the rest.)
Thanks.
I am trying to collect element text from an xml file. I have two.
They are identical except in tag case; <BOOKS> verses <books>. Here
are the xml "functions" I use in this exercise. XML files with upper
case tags to not parse. Is there anything about these functions below
that would require lower case tags? In fact, DO xml tags require
lower case. I understood they were case sensitive only. Here are the
funtions (ff2):
===================================================
xmldoc = document.implementation.createDocument("","",null);
xmldoc.async = false;
xmldoc.load("cdlc.xml");
//xmldoc.load("cduc.xml");
path = "/catalog/cd/title";
//path = "/CATALOG/CD/TITLE";
title_nodes = document.evaluate(
path, xmldoc, null, XPathResult.ANY_TYPE, null);
===================================================
The path is changed to "/CATALOG/CD/TITLE" for the upper case
xml file. I have tried this on two other xml files. Results are
indintical.
Upper - no data, lower - works fine.
Sample xml file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<catalog>
<cd>
<title>lite</title>
<author>sdfsf</author>
</cd>
<cd>
<title>medium</title>
<author>qewrwt</author>
</cd>
<cd>
<title>heavy</title>
<author>lkjlkj</author>
</cd>
</catalog>
(answering with an absolute no xlates into my problem. You can skip
the rest.)
Thanks.
I am trying to collect element text from an xml file. I have two.
They are identical except in tag case; <BOOKS> verses <books>. Here
are the xml "functions" I use in this exercise. XML files with upper
case tags to not parse. Is there anything about these functions below
that would require lower case tags? In fact, DO xml tags require
lower case. I understood they were case sensitive only. Here are the
funtions (ff2):
===================================================
xmldoc = document.implementation.createDocument("","",null);
xmldoc.async = false;
xmldoc.load("cdlc.xml");
//xmldoc.load("cduc.xml");
path = "/catalog/cd/title";
//path = "/CATALOG/CD/TITLE";
title_nodes = document.evaluate(
path, xmldoc, null, XPathResult.ANY_TYPE, null);
===================================================
The path is changed to "/CATALOG/CD/TITLE" for the upper case
xml file. I have tried this on two other xml files. Results are
indintical.
Upper - no data, lower - works fine.
Sample xml file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<catalog>
<cd>
<title>lite</title>
<author>sdfsf</author>
</cd>
<cd>
<title>medium</title>
<author>qewrwt</author>
</cd>
<cd>
<title>heavy</title>
<author>lkjlkj</author>
</cd>
</catalog>