You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by ka...@wipro.com on 2008/05/20 14:32:47 UTC

Problem loading XML File

Hi all,
 
we have String containing the XML data in the following format.
 
<HHP:HHP xmlns:HHP="HHP"><HHP:hapCageTable><HHP:hapCageEntry
cageId="2"><HHP:hapModemTable><HHP:hapModemEntry cageId="2" modemId="1"
modifier="relevant"><HHP:logLevel>20</HHP:logLevel></HHP:hapModemEntry><
/HHP:hapModemTable></HHP:hapCageEntry></HHP:hapCageTable></HHP:HHP>
 
We are creating the XML file out of the above data and trying to load to
DOMDocument*. But Xerces is failing to load the above content though the
above data is well-formed. We are using Xerces v 2.8. Any idea on why
above data cant be loaded to DOMDocument* ? 
 
is there any option that can be set so that above content can be loaded
successfully ???
 
Thanks a lot,
- Karuna
 

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

www.wipro.com

RE: Problem loading XML File

Posted by ka...@wipro.com.
Oops..I am not sure how it got missed. Attached the code again. Hope you
get it this time

-----Original Message-----
From: Jesse Pelton [mailto:jsp@PKC.com] 
Sent: Tuesday, May 20, 2008 7:12 PM
To: c-users@xerces.apache.org
Subject: RE: Problem loading XML File

I'm not sure why, but while the XML attachment came through, the code
didn't arrive at my machine, so I can't shed any light.

________________________________

From: karuna.kosaraju@wipro.com [mailto:karuna.kosaraju@wipro.com]
Sent: Tuesday, May 20, 2008 9:39 AM
To: c-users@xerces.apache.org
Subject: RE: Problem loading XML File



Yes, the sample apps do work. See below console print messages 

-bash-2.05b$ ./MemParse 

Finished parsing the memory buffer containing the following XML
statements: 

<HHP:HHP xmlns:HHP="HHP"><HHP:hapCageTable><HHP:hapCageEntry
cageId="2"><HHP:hapModemTable><HHP:hapModemEntry cageId="2" modemId="1"
modifier="relevant"><HHP:logLevel>20</HHP:logLevel></HHP:hapModemEntry><
/HHP:hapModemTable></HHP:hapCageEntry></HHP:hapCageTable></HHP:HHP>

Parsing took 0 ms (6 elements, 5 attributes, 0 spaces, 2 characters). 

-bash-2.05b$ ./DOMPrint Relevant_output.xml 

<?xml version="1.0" encoding="UTF-8" standalone="no" ?><HHP:HHP
xmlns:HHP="HHP"><HHP:hapCageTable><HHP:hapCageEntry
cageId="2"><HHP:hapModemTable><HHP:hapModemEntry cageId="2" modemId="1"
modifier="relevant"><HHP:logLevel>20</HHP:logLevel></HHP:hapModemEntry><
/HHP:hapModemTable></HHP:hapCageEntry></HHP:hapCageTable></HHP:HHP>-bash
-2.05b$

-bash-2.05b$ ./DOMCount Relevant_output.xml 
Relevant_output.xml: 0 ms (6 elems). 

I have attached the XML file containing the response
(Relevant_output.xml) and my source code snippet ( Code.cpp ). 

Let us know if you find any issue. 

<<Relevant_output.xml>> <<Code.cpp>> 
Thanks, 

-Karuna 

-----Original Message----- 
From: Jesse Pelton [mailto:jsp@PKC.com <ma...@PKC.com> ] 
Sent: Tuesday, May 20, 2008 6:47 PM 
To: c-users@xerces.apache.org 
Subject: RE: Problem loading XML File 

Do the sample apps (like DOMPrint) process your file successfully?  If 
you modify the MemParse sample, can it parse your data?   If they 
succeed, you might want to send your code. 

-----Original Message----- 
From: karuna.kosaraju@wipro.com [mailto:karuna.kosaraju@wipro.com
<ma...@wipro.com> ] 
Sent: Tuesday, May 20, 2008 8:56 AM 
To: c-users@xerces.apache.org 
Subject: RE: Problem loading XML File 

Yes, Its in the e-mail that the new line character has come. There is no
new line character in between the below string.

I can see that following data is loaded to Internet explorer and other
XML editors successfully. 
I wonder why I couldn't load it into a DOMDocument*. 

- Karuna 

P.S. The disclaimer note is automatically attached to every mail we send
from our company e-mail ID. 
Its not manually written by us. Its automatic action taken by mail
server. So nothing much I can do :-) 

-----Original Message----- 
From: Alberto Massari [mailto:amassari@datadirect.com
<ma...@datadirect.com> ] 
Sent: Tuesday, May 20, 2008 6:18 PM 
To: c-users@xerces.apache.org 
Subject: Re: Problem loading XML File 

Maybe it's just the e-mail software you are using, but the end tag for
HHP:hapModemTable has a new line between < and /HHP:hapModemTable>.

Alberto 

P.S. Do you realize that even if you wrote the disclaimer at the end,
this mail is going to be archived forever, making it a worthless waste
of bytes?


karuna.kosaraju@wipro.com wrote: 
> Hi all, 
>  
> we have String containing the XML data in the following format. 
>  
> <HHP:HHP xmlns:HHP="HHP"><HHP:hapCageTable><HHP:hapCageEntry 
> cageId="2"><HHP:hapModemTable><HHP:hapModemEntry cageId="2" 
modemId="1" 
> modifier="relevant"><HHP:logLevel>20</HHP:logLevel></HHP:hapModemEntry

> >< /HHP:hapModemTable></HHP:hapCageEntry></HHP:hapCageTable></HHP:HHP>

>  
> We are creating the XML file out of the above data and trying to load 
> to DOMDocument*. But Xerces is failing to load the above content 
> though the above data is well-formed. We are using Xerces v 2.8. Any 
> idea on why above data cant be loaded to DOMDocument* ? 
>  
> is there any option that can be set so that above content can be 
> loaded successfully ??? 
>  
> Thanks a lot, 
> - Karuna 
> 

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.

The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com <file://www.wipro.com>  

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com 


Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

www.wipro.com

Re: Problem loading XML File

Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Jesse,

Jesse Pelton <js...@PKC.com> writes:

> parseURI() needs an XMLCh, which is UTF-16.  As I understand it,
> string::c_str() returns 8-bit characters.

parseURI is overloaded for both XMLCh and char.

Karuna,

I suggest that you add the error handler to your code (as shown
in the examples) and see what diagnostics you get.

Boris

-- 
Boris Kolpackov, Code Synthesis Tools   http://codesynthesis.com/~boris/blog
Open source XML data binding for C++:   http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde

RE: Problem loading XML File

Posted by Jesse Pelton <js...@PKC.com>.
Without knowing what the problem is, it's hard to be certain whether 2.7
behaves differently that 2.8, but it seems unlikely.

One thing that pops out in a quick review of your code is the following
line:

  domDoc = necbParser->parseURI(file.c_str());

parseURI() needs an XMLCh, which is UTF-16.  As I understand it,
string::c_str() returns 8-bit characters.

-----Original Message-----
From: karuna.kosaraju@wipro.com [mailto:karuna.kosaraju@wipro.com] 
Sent: Tuesday, May 20, 2008 10:10 AM
To: c-users@xerces.apache.org
Subject: RE: Problem loading XML File

Just realized that the sample apps are tested with Xerces-c version 2.7
where as the source code is tested with Xerces-c version 2.8. Are there
any difference between these two versions in this regard? 

-----Original Message-----
From: Jesse Pelton [mailto:jsp@PKC.com] 
Sent: Tuesday, May 20, 2008 7:12 PM
To: c-users@xerces.apache.org
Subject: RE: Problem loading XML File

I'm not sure why, but while the XML attachment came through, the code
didn't arrive at my machine, so I can't shed any light.

________________________________

From: karuna.kosaraju@wipro.com [mailto:karuna.kosaraju@wipro.com]
Sent: Tuesday, May 20, 2008 9:39 AM
To: c-users@xerces.apache.org
Subject: RE: Problem loading XML File



Yes, the sample apps do work. See below console print messages 

-bash-2.05b$ ./MemParse 

Finished parsing the memory buffer containing the following XML
statements: 

<HHP:HHP xmlns:HHP="HHP"><HHP:hapCageTable><HHP:hapCageEntry
cageId="2"><HHP:hapModemTable><HHP:hapModemEntry cageId="2" modemId="1"
modifier="relevant"><HHP:logLevel>20</HHP:logLevel></HHP:hapModemEntry><
/HHP:hapModemTable></HHP:hapCageEntry></HHP:hapCageTable></HHP:HHP>

Parsing took 0 ms (6 elements, 5 attributes, 0 spaces, 2 characters). 

-bash-2.05b$ ./DOMPrint Relevant_output.xml 

<?xml version="1.0" encoding="UTF-8" standalone="no" ?><HHP:HHP
xmlns:HHP="HHP"><HHP:hapCageTable><HHP:hapCageEntry
cageId="2"><HHP:hapModemTable><HHP:hapModemEntry cageId="2" modemId="1"
modifier="relevant"><HHP:logLevel>20</HHP:logLevel></HHP:hapModemEntry><
/HHP:hapModemTable></HHP:hapCageEntry></HHP:hapCageTable></HHP:HHP>-bash
-2.05b$

-bash-2.05b$ ./DOMCount Relevant_output.xml 
Relevant_output.xml: 0 ms (6 elems). 

I have attached the XML file containing the response
(Relevant_output.xml) and my source code snippet ( Code.cpp ). 

Let us know if you find any issue. 

<<Relevant_output.xml>> <<Code.cpp>> 
Thanks, 

-Karuna 

-----Original Message----- 
From: Jesse Pelton [mailto:jsp@PKC.com <ma...@PKC.com> ] 
Sent: Tuesday, May 20, 2008 6:47 PM 
To: c-users@xerces.apache.org 
Subject: RE: Problem loading XML File 

Do the sample apps (like DOMPrint) process your file successfully?  If 
you modify the MemParse sample, can it parse your data?   If they 
succeed, you might want to send your code. 

-----Original Message----- 
From: karuna.kosaraju@wipro.com [mailto:karuna.kosaraju@wipro.com
<ma...@wipro.com> ] 
Sent: Tuesday, May 20, 2008 8:56 AM 
To: c-users@xerces.apache.org 
Subject: RE: Problem loading XML File 

Yes, Its in the e-mail that the new line character has come. There is no
new line character in between the below string.

I can see that following data is loaded to Internet explorer and other
XML editors successfully. 
I wonder why I couldn't load it into a DOMDocument*. 

- Karuna 

P.S. The disclaimer note is automatically attached to every mail we send
from our company e-mail ID. 
Its not manually written by us. Its automatic action taken by mail
server. So nothing much I can do :-) 

-----Original Message----- 
From: Alberto Massari [mailto:amassari@datadirect.com
<ma...@datadirect.com> ] 
Sent: Tuesday, May 20, 2008 6:18 PM 
To: c-users@xerces.apache.org 
Subject: Re: Problem loading XML File 

Maybe it's just the e-mail software you are using, but the end tag for
HHP:hapModemTable has a new line between < and /HHP:hapModemTable>.

Alberto 

P.S. Do you realize that even if you wrote the disclaimer at the end,
this mail is going to be archived forever, making it a worthless waste
of bytes?


karuna.kosaraju@wipro.com wrote: 
> Hi all, 
>  
> we have String containing the XML data in the following format. 
>  
> <HHP:HHP xmlns:HHP="HHP"><HHP:hapCageTable><HHP:hapCageEntry 
> cageId="2"><HHP:hapModemTable><HHP:hapModemEntry cageId="2" 
modemId="1" 
> modifier="relevant"><HHP:logLevel>20</HHP:logLevel></HHP:hapModemEntry

> >< /HHP:hapModemTable></HHP:hapCageEntry></HHP:hapCageTable></HHP:HHP>

>  
> We are creating the XML file out of the above data and trying to load 
> to DOMDocument*. But Xerces is failing to load the above content 
> though the above data is well-formed. We are using Xerces v 2.8. Any 
> idea on why above data cant be loaded to DOMDocument* ? 
>  
> is there any option that can be set so that above content can be 
> loaded successfully ??? 
>  
> Thanks a lot, 
> - Karuna 
> 

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.

The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com <file://www.wipro.com>  

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com 


Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com

RE: Problem loading XML File

Posted by ka...@wipro.com.
Just realized that the sample apps are tested with Xerces-c version 2.7
where as the source code is tested with Xerces-c version 2.8. Are there
any difference between these two versions in this regard? 

-----Original Message-----
From: Jesse Pelton [mailto:jsp@PKC.com] 
Sent: Tuesday, May 20, 2008 7:12 PM
To: c-users@xerces.apache.org
Subject: RE: Problem loading XML File

I'm not sure why, but while the XML attachment came through, the code
didn't arrive at my machine, so I can't shed any light.

________________________________

From: karuna.kosaraju@wipro.com [mailto:karuna.kosaraju@wipro.com]
Sent: Tuesday, May 20, 2008 9:39 AM
To: c-users@xerces.apache.org
Subject: RE: Problem loading XML File



Yes, the sample apps do work. See below console print messages 

-bash-2.05b$ ./MemParse 

Finished parsing the memory buffer containing the following XML
statements: 

<HHP:HHP xmlns:HHP="HHP"><HHP:hapCageTable><HHP:hapCageEntry
cageId="2"><HHP:hapModemTable><HHP:hapModemEntry cageId="2" modemId="1"
modifier="relevant"><HHP:logLevel>20</HHP:logLevel></HHP:hapModemEntry><
/HHP:hapModemTable></HHP:hapCageEntry></HHP:hapCageTable></HHP:HHP>

Parsing took 0 ms (6 elements, 5 attributes, 0 spaces, 2 characters). 

-bash-2.05b$ ./DOMPrint Relevant_output.xml 

<?xml version="1.0" encoding="UTF-8" standalone="no" ?><HHP:HHP
xmlns:HHP="HHP"><HHP:hapCageTable><HHP:hapCageEntry
cageId="2"><HHP:hapModemTable><HHP:hapModemEntry cageId="2" modemId="1"
modifier="relevant"><HHP:logLevel>20</HHP:logLevel></HHP:hapModemEntry><
/HHP:hapModemTable></HHP:hapCageEntry></HHP:hapCageTable></HHP:HHP>-bash
-2.05b$

-bash-2.05b$ ./DOMCount Relevant_output.xml 
Relevant_output.xml: 0 ms (6 elems). 

I have attached the XML file containing the response
(Relevant_output.xml) and my source code snippet ( Code.cpp ). 

Let us know if you find any issue. 

<<Relevant_output.xml>> <<Code.cpp>> 
Thanks, 

-Karuna 

-----Original Message----- 
From: Jesse Pelton [mailto:jsp@PKC.com <ma...@PKC.com> ] 
Sent: Tuesday, May 20, 2008 6:47 PM 
To: c-users@xerces.apache.org 
Subject: RE: Problem loading XML File 

Do the sample apps (like DOMPrint) process your file successfully?  If 
you modify the MemParse sample, can it parse your data?   If they 
succeed, you might want to send your code. 

-----Original Message----- 
From: karuna.kosaraju@wipro.com [mailto:karuna.kosaraju@wipro.com
<ma...@wipro.com> ] 
Sent: Tuesday, May 20, 2008 8:56 AM 
To: c-users@xerces.apache.org 
Subject: RE: Problem loading XML File 

Yes, Its in the e-mail that the new line character has come. There is no
new line character in between the below string.

I can see that following data is loaded to Internet explorer and other
XML editors successfully. 
I wonder why I couldn't load it into a DOMDocument*. 

- Karuna 

P.S. The disclaimer note is automatically attached to every mail we send
from our company e-mail ID. 
Its not manually written by us. Its automatic action taken by mail
server. So nothing much I can do :-) 

-----Original Message----- 
From: Alberto Massari [mailto:amassari@datadirect.com
<ma...@datadirect.com> ] 
Sent: Tuesday, May 20, 2008 6:18 PM 
To: c-users@xerces.apache.org 
Subject: Re: Problem loading XML File 

Maybe it's just the e-mail software you are using, but the end tag for
HHP:hapModemTable has a new line between < and /HHP:hapModemTable>.

Alberto 

P.S. Do you realize that even if you wrote the disclaimer at the end,
this mail is going to be archived forever, making it a worthless waste
of bytes?


karuna.kosaraju@wipro.com wrote: 
> Hi all, 
>  
> we have String containing the XML data in the following format. 
>  
> <HHP:HHP xmlns:HHP="HHP"><HHP:hapCageTable><HHP:hapCageEntry 
> cageId="2"><HHP:hapModemTable><HHP:hapModemEntry cageId="2" 
modemId="1" 
> modifier="relevant"><HHP:logLevel>20</HHP:logLevel></HHP:hapModemEntry

> >< /HHP:hapModemTable></HHP:hapCageEntry></HHP:hapCageTable></HHP:HHP>

>  
> We are creating the XML file out of the above data and trying to load 
> to DOMDocument*. But Xerces is failing to load the above content 
> though the above data is well-formed. We are using Xerces v 2.8. Any 
> idea on why above data cant be loaded to DOMDocument* ? 
>  
> is there any option that can be set so that above content can be 
> loaded successfully ??? 
>  
> Thanks a lot, 
> - Karuna 
> 

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.

The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com <file://www.wipro.com>  

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com 


Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

www.wipro.com

RE: Problem loading XML File

Posted by Jesse Pelton <js...@PKC.com>.
I'm not sure why, but while the XML attachment came through, the code
didn't arrive at my machine, so I can't shed any light.

________________________________

From: karuna.kosaraju@wipro.com [mailto:karuna.kosaraju@wipro.com] 
Sent: Tuesday, May 20, 2008 9:39 AM
To: c-users@xerces.apache.org
Subject: RE: Problem loading XML File



Yes, the sample apps do work. See below console print messages 

-bash-2.05b$ ./MemParse 

Finished parsing the memory buffer containing the following XML
statements: 

<HHP:HHP xmlns:HHP="HHP"><HHP:hapCageTable><HHP:hapCageEntry
cageId="2"><HHP:hapModemTable><HHP:hapModemEntry cageId="2" modemId="1"
modifier="relevant"><HHP:logLevel>20</HHP:logLevel></HHP:hapModemEntry><
/HHP:hapModemTable></HHP:hapCageEntry></HHP:hapCageTable></HHP:HHP>

Parsing took 0 ms (6 elements, 5 attributes, 0 spaces, 2 characters). 

-bash-2.05b$ ./DOMPrint Relevant_output.xml 

<?xml version="1.0" encoding="UTF-8" standalone="no" ?><HHP:HHP
xmlns:HHP="HHP"><HHP:hapCageTable><HHP:hapCageEntry
cageId="2"><HHP:hapModemTable><HHP:hapModemEntry cageId="2" modemId="1"
modifier="relevant"><HHP:logLevel>20</HHP:logLevel></HHP:hapModemEntry><
/HHP:hapModemTable></HHP:hapCageEntry></HHP:hapCageTable></HHP:HHP>-bash
-2.05b$

-bash-2.05b$ ./DOMCount Relevant_output.xml 
Relevant_output.xml: 0 ms (6 elems). 

I have attached the XML file containing the response
(Relevant_output.xml) and my source code snippet ( Code.cpp ). 

Let us know if you find any issue. 

<<Relevant_output.xml>> <<Code.cpp>> 
Thanks, 

-Karuna 

-----Original Message----- 
From: Jesse Pelton [mailto:jsp@PKC.com <ma...@PKC.com> ] 
Sent: Tuesday, May 20, 2008 6:47 PM 
To: c-users@xerces.apache.org 
Subject: RE: Problem loading XML File 

Do the sample apps (like DOMPrint) process your file successfully?  If 
you modify the MemParse sample, can it parse your data?   If they 
succeed, you might want to send your code. 

-----Original Message----- 
From: karuna.kosaraju@wipro.com [mailto:karuna.kosaraju@wipro.com
<ma...@wipro.com> ] 
Sent: Tuesday, May 20, 2008 8:56 AM 
To: c-users@xerces.apache.org 
Subject: RE: Problem loading XML File 

Yes, Its in the e-mail that the new line character has come. There is no
new line character in between the below string.

I can see that following data is loaded to Internet explorer and other
XML editors successfully. 
I wonder why I couldn't load it into a DOMDocument*. 

- Karuna 

P.S. The disclaimer note is automatically attached to every mail we send
from our company e-mail ID. 
Its not manually written by us. Its automatic action taken by mail
server. So nothing much I can do :-) 

-----Original Message----- 
From: Alberto Massari [mailto:amassari@datadirect.com
<ma...@datadirect.com> ] 
Sent: Tuesday, May 20, 2008 6:18 PM 
To: c-users@xerces.apache.org 
Subject: Re: Problem loading XML File 

Maybe it's just the e-mail software you are using, but the end tag for
HHP:hapModemTable has a new line between < and /HHP:hapModemTable>.

Alberto 

P.S. Do you realize that even if you wrote the disclaimer at the end,
this mail is going to be archived forever, making it a worthless waste
of bytes?


karuna.kosaraju@wipro.com wrote: 
> Hi all, 
>  
> we have String containing the XML data in the following format. 
>  
> <HHP:HHP xmlns:HHP="HHP"><HHP:hapCageTable><HHP:hapCageEntry 
> cageId="2"><HHP:hapModemTable><HHP:hapModemEntry cageId="2" 
modemId="1" 
> modifier="relevant"><HHP:logLevel>20</HHP:logLevel></HHP:hapModemEntry

> >< /HHP:hapModemTable></HHP:hapCageEntry></HHP:hapCageTable></HHP:HHP>

>  
> We are creating the XML file out of the above data and trying to load 
> to DOMDocument*. But Xerces is failing to load the above content 
> though the above data is well-formed. We are using Xerces v 2.8. Any 
> idea on why above data cant be loaded to DOMDocument* ? 
>  
> is there any option that can be set so that above content can be 
> loaded successfully ??? 
>  
> Thanks a lot, 
> - Karuna 
> 

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.

The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com <file://www.wipro.com>  

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com 


RE: Problem loading XML File

Posted by ka...@wipro.com.
Yes, the sample apps do work. See below console print messages

-bash-2.05b$ ./MemParse

Finished parsing the memory buffer containing the following XML
statements:

<HHP:HHP xmlns:HHP="HHP"><HHP:hapCageTable><HHP:hapCageEntry
cageId="2"><HHP:hapModemTable><HHP:hapModemEntry cageId="2" modemId="1"
modifier="relevant"><HHP:logLevel>20</HHP:logLevel></HHP:hapModemEntry><
/HHP:hapModemTable></HHP:hapCageEntry></HHP:hapCageTable></HHP:HHP>
Parsing took 0 ms (6 elements, 5 attributes, 0 spaces, 2 characters).

-bash-2.05b$ ./DOMPrint Relevant_output.xml

<?xml version="1.0" encoding="UTF-8" standalone="no" ?><HHP:HHP
xmlns:HHP="HHP"><HHP:hapCageTable><HHP:hapCageEntry
cageId="2"><HHP:hapModemTable><HHP:hapModemEntry cageId="2" modemId="1"
modifier="relevant"><HHP:logLevel>20</HHP:logLevel></HHP:hapModemEntry><
/HHP:hapModemTable></HHP:hapCageEntry></HHP:hapCageTable></HHP:HHP>-bash
-2.05b$

-bash-2.05b$ ./DOMCount Relevant_output.xml
Relevant_output.xml: 0 ms (6 elems).

I have attached the XML file containing the response
(Relevant_output.xml) and my source code snippet ( Code.cpp ).

Let us know if you find any issue.

 <<Relevant_output.xml>>  <<Code.cpp>> 
Thanks,

-Karuna

-----Original Message-----
From: Jesse Pelton [mailto:jsp@PKC.com] 
Sent: Tuesday, May 20, 2008 6:47 PM
To: c-users@xerces.apache.org
Subject: RE: Problem loading XML File

Do the sample apps (like DOMPrint) process your file successfully?  If
you modify the MemParse sample, can it parse your data?   If they
succeed, you might want to send your code.

-----Original Message-----
From: karuna.kosaraju@wipro.com [mailto:karuna.kosaraju@wipro.com]
Sent: Tuesday, May 20, 2008 8:56 AM
To: c-users@xerces.apache.org
Subject: RE: Problem loading XML File

Yes, Its in the e-mail that the new line character has come. There is no
new line character in between the below string.
I can see that following data is loaded to Internet explorer and other
XML editors successfully. 
I wonder why I couldn't load it into a DOMDocument*.

- Karuna

P.S. The disclaimer note is automatically attached to every mail we send
from our company e-mail ID.
Its not manually written by us. Its automatic action taken by mail
server. So nothing much I can do :-)

-----Original Message-----
From: Alberto Massari [mailto:amassari@datadirect.com]
Sent: Tuesday, May 20, 2008 6:18 PM
To: c-users@xerces.apache.org
Subject: Re: Problem loading XML File

Maybe it's just the e-mail software you are using, but the end tag for
HHP:hapModemTable has a new line between < and /HHP:hapModemTable>.

Alberto

P.S. Do you realize that even if you wrote the disclaimer at the end,
this mail is going to be archived forever, making it a worthless waste
of bytes?


karuna.kosaraju@wipro.com wrote:
> Hi all,
>  
> we have String containing the XML data in the following format.
>  
> <HHP:HHP xmlns:HHP="HHP"><HHP:hapCageTable><HHP:hapCageEntry
> cageId="2"><HHP:hapModemTable><HHP:hapModemEntry cageId="2"
modemId="1"
> modifier="relevant"><HHP:logLevel>20</HHP:logLevel></HHP:hapModemEntry
> >< /HHP:hapModemTable></HHP:hapCageEntry></HHP:hapCageTable></HHP:HHP>
>  
> We are creating the XML file out of the above data and trying to load 
> to DOMDocument*. But Xerces is failing to load the above content 
> though the above data is well-formed. We are using Xerces v 2.8. Any 
> idea on why above data cant be loaded to DOMDocument* ?
>  
> is there any option that can be set so that above content can be 
> loaded successfully ???
>  
> Thanks a lot,
> - Karuna
> 

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

www.wipro.com

RE: Problem loading XML File

Posted by Jesse Pelton <js...@PKC.com>.
Do the sample apps (like DOMPrint) process your file successfully?  If
you modify the MemParse sample, can it parse your data?   If they
succeed, you might want to send your code.

-----Original Message-----
From: karuna.kosaraju@wipro.com [mailto:karuna.kosaraju@wipro.com] 
Sent: Tuesday, May 20, 2008 8:56 AM
To: c-users@xerces.apache.org
Subject: RE: Problem loading XML File

Yes, Its in the e-mail that the new line character has come. There is no
new line character in between the below string.
I can see that following data is loaded to Internet explorer and other
XML editors successfully. 
I wonder why I couldn't load it into a DOMDocument*.

- Karuna

P.S. The disclaimer note is automatically attached to every mail we send
from our company e-mail ID.
Its not manually written by us. Its automatic action taken by mail
server. So nothing much I can do :-)

-----Original Message-----
From: Alberto Massari [mailto:amassari@datadirect.com] 
Sent: Tuesday, May 20, 2008 6:18 PM
To: c-users@xerces.apache.org
Subject: Re: Problem loading XML File

Maybe it's just the e-mail software you are using, but the end tag for
HHP:hapModemTable has a new line between < and /HHP:hapModemTable>.

Alberto

P.S. Do you realize that even if you wrote the disclaimer at the end,
this mail is going to be archived forever, making it a worthless waste
of bytes?


karuna.kosaraju@wipro.com wrote:
> Hi all,
>  
> we have String containing the XML data in the following format.
>  
> <HHP:HHP xmlns:HHP="HHP"><HHP:hapCageTable><HHP:hapCageEntry
> cageId="2"><HHP:hapModemTable><HHP:hapModemEntry cageId="2"
modemId="1"
> modifier="relevant"><HHP:logLevel>20</HHP:logLevel></HHP:hapModemEntry
> >< /HHP:hapModemTable></HHP:hapCageEntry></HHP:hapCageTable></HHP:HHP>
>  
> We are creating the XML file out of the above data and trying to load 
> to DOMDocument*. But Xerces is failing to load the above content 
> though the above data is well-formed. We are using Xerces v 2.8. Any 
> idea on why above data cant be loaded to DOMDocument* ?
>  
> is there any option that can be set so that above content can be 
> loaded successfully ???
>  
> Thanks a lot,
> - Karuna
> 

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com

RE: Problem loading XML File

Posted by ka...@wipro.com.
Yes, Its in the e-mail that the new line character has come. There is no
new line character in between the below string.
I can see that following data is loaded to Internet explorer and other
XML editors successfully. 
I wonder why I couldn't load it into a DOMDocument*.

- Karuna

P.S. The disclaimer note is automatically attached to every mail we send
from our company e-mail ID.
Its not manually written by us. Its automatic action taken by mail
server. So nothing much I can do :-)

-----Original Message-----
From: Alberto Massari [mailto:amassari@datadirect.com] 
Sent: Tuesday, May 20, 2008 6:18 PM
To: c-users@xerces.apache.org
Subject: Re: Problem loading XML File

Maybe it's just the e-mail software you are using, but the end tag for
HHP:hapModemTable has a new line between < and /HHP:hapModemTable>.

Alberto

P.S. Do you realize that even if you wrote the disclaimer at the end,
this mail is going to be archived forever, making it a worthless waste
of bytes?


karuna.kosaraju@wipro.com wrote:
> Hi all,
>  
> we have String containing the XML data in the following format.
>  
> <HHP:HHP xmlns:HHP="HHP"><HHP:hapCageTable><HHP:hapCageEntry
> cageId="2"><HHP:hapModemTable><HHP:hapModemEntry cageId="2"
modemId="1"
> modifier="relevant"><HHP:logLevel>20</HHP:logLevel></HHP:hapModemEntry
> >< /HHP:hapModemTable></HHP:hapCageEntry></HHP:hapCageTable></HHP:HHP>
>  
> We are creating the XML file out of the above data and trying to load 
> to DOMDocument*. But Xerces is failing to load the above content 
> though the above data is well-formed. We are using Xerces v 2.8. Any 
> idea on why above data cant be loaded to DOMDocument* ?
>  
> is there any option that can be set so that above content can be 
> loaded successfully ???
>  
> Thanks a lot,
> - Karuna
> 

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

www.wipro.com

Re: Problem loading XML File

Posted by Alberto Massari <am...@datadirect.com>.
Maybe it's just the e-mail software you are using, but the end tag for 
HHP:hapModemTable has a new line between < and /HHP:hapModemTable>.

Alberto

P.S. Do you realize that even if you wrote the disclaimer at the end, 
this mail is going to be archived forever, making it a worthless waste 
of bytes?


karuna.kosaraju@wipro.com wrote:
> Hi all,
>  
> we have String containing the XML data in the following format.
>  
> <HHP:HHP xmlns:HHP="HHP"><HHP:hapCageTable><HHP:hapCageEntry
> cageId="2"><HHP:hapModemTable><HHP:hapModemEntry cageId="2" modemId="1"
> modifier="relevant"><HHP:logLevel>20</HHP:logLevel></HHP:hapModemEntry><
> /HHP:hapModemTable></HHP:hapCageEntry></HHP:hapCageTable></HHP:HHP>
>  
> We are creating the XML file out of the above data and trying to load to
> DOMDocument*. But Xerces is failing to load the above content though the
> above data is well-formed. We are using Xerces v 2.8. Any idea on why
> above data cant be loaded to DOMDocument* ? 
>  
> is there any option that can be set so that above content can be loaded
> successfully ???
>  
> Thanks a lot,
> - Karuna
>  
>
> Please do not print this email unless it is absolutely necessary. 
>
> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 
>
> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 
>
> www.wipro.com
>
>