xerces not parsing elements correctly 2003-05-02 - By Malia Zaheer
I am using xerces to parse an xml file containing the element: <ldap.username>uid=admin,ou=Administrators,ou=TopologyManagement,o=NetscapeR oot</ldap.username>
But, the parser is deleting some characters while parsing the string and I get this:
uid=admin,ou=Administrators,ou=ologyManagement,o=NetscapeRoot
Notice the Top in TopologyManagement is missing and I get ologyManagement. This has happened with another element in the same file.
<ldap.organization>uid=UShasta,ou=People,o=technicacorp.com</ldap.organizati on>
In that case, the parser omitted "uid=UShasta," from the element and I got
<ldap.organization>ou=People,o=technicacorp.com</ldap.organization>
I figured this problem and just moved that element above another element and things started working. Now I am getting similar error and I don't want to kluge the system by finding a workaround. I think this is a bug with Xerces. I don't know what could be causing this because this error happens only sometimes, not always. The last time it happened, it consistently gave me that error until I move the element around, but after that, it didn't happened for about 3 weeks. I am using Xerces 2.0.0.
Thanks,
Malia
<html>
<head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 10 (filtered)">
<style> <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline;} span.EmailStyle17 {font-family:Arial; color:windowtext;} @(protected) Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in;} div.Section1 {page:Section1;} --> </style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>I am using xerces to parse an xml file containing the element: <ldap.username>uid=admin,ou=Administrators,ou=TopologyManagement,o =NetscapeRoot</ldap.username></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>But, the parser is deleting some characters while parsing the string and I get this:</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>uid=admin,ou=Administrators,ou=ologyManagement,o =NetscapeRoot</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>Notice the Top in TopologyManagement is missing and I get ologyManagement. This has happened with another element in the same file.</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><ldap.organization>uid=UShasta,ou=People,o =technicacorp.com</ldap.organization></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>In that case, the parser omitted "uid=UShasta," from the element and I got</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><ldap.organization>ou=People,o=technicacorp.com< /ldap.organization></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>I figured this problem and just moved that element above another element and things started working. Now I am getting similar error and I don't want to kluge the system by finding a workaround. I think this is a bug with Xerces. I don't know what could be causing this because this error happens only sometimes, not always. The last time it happened, it consistently gave me that error until I move the element around, but after that, it didn't happened for about 3 weeks. I am using Xerces 2.0.0.</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>Thanks,</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>Malia</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> </span></font></p>
</div>
</body>
</html>
|
|