You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "varun.81" <va...@gmail.com> on 2007/02/06 17:19:45 UTC

parsing xml

hi i am new to use this xerces tool.....i have to parse an xml a very simple
one say 

      hello


i am able to do it through an xml file, but it throws me an error when i try
to give xml with proper indentetion but it works if i give xml without
spaces between the tags.
i will be obliged if someone can help me finding out why it fails with
indentation
thnx
ps:  i am writting code in C++
-- 
View this message in context: http://www.nabble.com/parsing-xml-tf3181498.html#a8828911
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.

RE: parsing xml

Posted by "varun.81" <va...@gmail.com>.
"<input> 
        <child name="Varun">hello</child> 
</input>" 
this is the content of the file i am trying to parse

Jesse Pelton wrote:
> 
> Could you attach a sample document that fails to parse? If you embed it
> in a message, it's subject to rearrangement or misinterpretation. For
> instance, my mail client displays a text box instead of your sample
> document.
>  
> Also, please note whether sample apps like DOMParse parse the document
> successfully.
> 
> ________________________________
> 
> From: varun.81 [mailto:varunbhatia.81@gmail.com] 
> Sent: Tuesday, February 06, 2007 11:20 AM
> To: c-dev@xerces.apache.org
> Subject: parsing xml
> 
> 
> hi i am new to use this xerces tool.....i have to parse an xml a very
> simple one say  hello i am able to do it through an xml file, but it
> throws me an error when i try to give xml with proper indentetion but it
> works if i give xml without spaces between the tags. i will be obliged
> if someone can help me finding out why it fails with indentation thnx
> ps: i am writting code in C++ 
> 
> ________________________________
> 
> View this message in context: parsing xml
> <http://www.nabble.com/parsing-xml-tf3181498.html#a8828911> 
> Sent from the Xerces - C - Dev
> <http://www.nabble.com/Xerces---C---Dev-f282.html>  mailing list archive
> at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/parsing-xml-tf3181498.html#a8829435
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


RE: parsing xml

Posted by Jesse Pelton <js...@PKC.com>.
Could you attach a sample document that fails to parse? If you embed it
in a message, it's subject to rearrangement or misinterpretation. For
instance, my mail client displays a text box instead of your sample
document.
 
Also, please note whether sample apps like DOMParse parse the document
successfully.

________________________________

From: varun.81 [mailto:varunbhatia.81@gmail.com] 
Sent: Tuesday, February 06, 2007 11:20 AM
To: c-dev@xerces.apache.org
Subject: parsing xml


hi i am new to use this xerces tool.....i have to parse an xml a very
simple one say  hello i am able to do it through an xml file, but it
throws me an error when i try to give xml with proper indentetion but it
works if i give xml without spaces between the tags. i will be obliged
if someone can help me finding out why it fails with indentation thnx
ps: i am writting code in C++ 

________________________________

View this message in context: parsing xml
<http://www.nabble.com/parsing-xml-tf3181498.html#a8828911> 
Sent from the Xerces - C - Dev
<http://www.nabble.com/Xerces---C---Dev-f282.html>  mailing list archive
at Nabble.com.


RE: Re: parsing xml

Posted by "varun.81" <va...@gmail.com>.
hi...i got it but with little different way......on domELment i did
getFirstChildren() and then getValue() on that node
But key point is i had to write my own function as well to check for
children. But it worked so its ok

Jesse Pelton wrote:
> 
> I'd wager that you're calling getNodeValue() on an element node.
> Elements have no value; they have children.  In your example, the item
> element has a single text node child.  I suspect you want the value of
> that node.  As I mentioned, you may want to use DOMText::getWholeText()
> to be sure any adjacent text nodes are included.
> 
> Or you can use a handy-dandy new DOM 3 function to get the text of any
> given node and its descendants: DOMNode::getTextContent().  This should
> return "varun" if you call it on the item element.  It's probably not
> appropriate if you want to have elements with both text and element
> content, though.
> 
> -----Original Message-----
> From: varun.81 [mailto:varunbhatia.81@gmail.com] 
> Sent: Wednesday, February 07, 2007 5:48 AM
> To: c-dev@xerces.apache.org
> Subject: RE: Re: parsing xml
> 
> 
> thanx a lot for the help....i have been able to parse the file with
> indentation......but now in my node when i call getNodeValue().
> i am not getting the value i expected.
> my node is like 
> <item>varun</item>
> when i say getNodeValue()
> and try to print it i get a blank value. Can you tell my why ?
> 
> Jesse Pelton wrote:
>> 
>> I always wondered what that flag was for! 
>> 
>> -----Original Message-----
>> From: news [mailto:news@sea.gmane.org] On Behalf Of Boris Kolpackov
>> Sent: Tuesday, February 06, 2007 3:11 PM
>> To: c-dev@xerces.apache.org
>> Subject: Re: parsing xml
>> 
>> Hi Jesse,
>> 
>> "Jesse Pelton" <js...@PKC.com> writes:
>> 
>>> Alternatively, you can write a DTD or schema for your documents and
>> let
>>> Xerces sort out which nodes are white space in element content.
>> You'll
>>> still need to check whether the node you're processing is a text
> node;
>>> if it is, DOMText::getIsWhitespaceInElementContent() will tell you
>>> whether it's white space in element content.
>> 
>> There is actually a parsing feature, fgDOMWhitespaceInElementContent,
>> when set to false it results in all ignorable whitespaces being
> removed
>> from the resulting DOM document. Very handy.
>> 
>> 
>> hth,
>> -boris
>> 
>> 
>> -- 
>> Boris Kolpackov
>> Code Synthesis Tools CC
>> http://www.codesynthesis.com
>> Open-Source, Cross-Platform C++ XML Data Binding
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>> For additional commands, e-mail: c-dev-help@xerces.apache.org
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>> For additional commands, e-mail: c-dev-help@xerces.apache.org
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/parsing-xml-tf3181498.html#a8843236
> Sent from the Xerces - C - Dev mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/parsing-xml-tf3181498.html#a8849079
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


RE: Re: parsing xml

Posted by Jesse Pelton <js...@PKC.com>.
I'd wager that you're calling getNodeValue() on an element node.
Elements have no value; they have children.  In your example, the item
element has a single text node child.  I suspect you want the value of
that node.  As I mentioned, you may want to use DOMText::getWholeText()
to be sure any adjacent text nodes are included.

Or you can use a handy-dandy new DOM 3 function to get the text of any
given node and its descendants: DOMNode::getTextContent().  This should
return "varun" if you call it on the item element.  It's probably not
appropriate if you want to have elements with both text and element
content, though.

-----Original Message-----
From: varun.81 [mailto:varunbhatia.81@gmail.com] 
Sent: Wednesday, February 07, 2007 5:48 AM
To: c-dev@xerces.apache.org
Subject: RE: Re: parsing xml


thanx a lot for the help....i have been able to parse the file with
indentation......but now in my node when i call getNodeValue().
i am not getting the value i expected.
my node is like 
<item>varun</item>
when i say getNodeValue()
and try to print it i get a blank value. Can you tell my why ?

Jesse Pelton wrote:
> 
> I always wondered what that flag was for! 
> 
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Boris Kolpackov
> Sent: Tuesday, February 06, 2007 3:11 PM
> To: c-dev@xerces.apache.org
> Subject: Re: parsing xml
> 
> Hi Jesse,
> 
> "Jesse Pelton" <js...@PKC.com> writes:
> 
>> Alternatively, you can write a DTD or schema for your documents and
> let
>> Xerces sort out which nodes are white space in element content.
> You'll
>> still need to check whether the node you're processing is a text
node;
>> if it is, DOMText::getIsWhitespaceInElementContent() will tell you
>> whether it's white space in element content.
> 
> There is actually a parsing feature, fgDOMWhitespaceInElementContent,
> when set to false it results in all ignorable whitespaces being
removed
> from the resulting DOM document. Very handy.
> 
> 
> hth,
> -boris
> 
> 
> -- 
> Boris Kolpackov
> Code Synthesis Tools CC
> http://www.codesynthesis.com
> Open-Source, Cross-Platform C++ XML Data Binding
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/parsing-xml-tf3181498.html#a8843236
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


RE: Re: parsing xml

Posted by "varun.81" <va...@gmail.com>.
thanx a lot for the help....i have been able to parse the file with
indentation......but now in my node when i call getNodeValue().
i am not getting the value i expected.
my node is like 
<item>varun</item>
when i say getNodeValue()
and try to print it i get a blank value. Can you tell my why ?

Jesse Pelton wrote:
> 
> I always wondered what that flag was for! 
> 
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Boris Kolpackov
> Sent: Tuesday, February 06, 2007 3:11 PM
> To: c-dev@xerces.apache.org
> Subject: Re: parsing xml
> 
> Hi Jesse,
> 
> "Jesse Pelton" <js...@PKC.com> writes:
> 
>> Alternatively, you can write a DTD or schema for your documents and
> let
>> Xerces sort out which nodes are white space in element content.
> You'll
>> still need to check whether the node you're processing is a text node;
>> if it is, DOMText::getIsWhitespaceInElementContent() will tell you
>> whether it's white space in element content.
> 
> There is actually a parsing feature, fgDOMWhitespaceInElementContent,
> when set to false it results in all ignorable whitespaces being removed
> from the resulting DOM document. Very handy.
> 
> 
> hth,
> -boris
> 
> 
> -- 
> Boris Kolpackov
> Code Synthesis Tools CC
> http://www.codesynthesis.com
> Open-Source, Cross-Platform C++ XML Data Binding
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/parsing-xml-tf3181498.html#a8843236
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


RE: Re: parsing xml

Posted by Jesse Pelton <js...@PKC.com>.
I always wondered what that flag was for! 

-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Boris Kolpackov
Sent: Tuesday, February 06, 2007 3:11 PM
To: c-dev@xerces.apache.org
Subject: Re: parsing xml

Hi Jesse,

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

> Alternatively, you can write a DTD or schema for your documents and
let
> Xerces sort out which nodes are white space in element content.
You'll
> still need to check whether the node you're processing is a text node;
> if it is, DOMText::getIsWhitespaceInElementContent() will tell you
> whether it's white space in element content.

There is actually a parsing feature, fgDOMWhitespaceInElementContent,
when set to false it results in all ignorable whitespaces being removed
from the resulting DOM document. Very handy.


hth,
-boris


-- 
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: parsing xml

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

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

> Alternatively, you can write a DTD or schema for your documents and let
> Xerces sort out which nodes are white space in element content.  You'll
> still need to check whether the node you're processing is a text node;
> if it is, DOMText::getIsWhitespaceInElementContent() will tell you
> whether it's white space in element content.

There is actually a parsing feature, fgDOMWhitespaceInElementContent,
when set to false it results in all ignorable whitespaces being removed
from the resulting DOM document. Very handy.


hth,
-boris


-- 
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


RE: parsing xml

Posted by Jesse Pelton <js...@PKC.com>.
I forgot to respond to your specific question: if you want to ignore
certain text, check whether the node you're processing is a text node,
and if so, skip processing it if you determine you don't care about its
contents.  DOMNode::getNodeType() allows you to determine the type of
any given node (DOMNode::TEXT_NODE indicates text).  According to the
API documentation, DOMText::getWholeText() will give you the text of the
current text node and any logically adjacent text nodes.  (Under some
circumstances, logically contiguous text may be split up over multiple
text nodes.)

Alternatively, you can write a DTD or schema for your documents and let
Xerces sort out which nodes are white space in element content.  You'll
still need to check whether the node you're processing is a text node;
if it is, DOMText::getIsWhitespaceInElementContent() will tell you
whether it's white space in element content.

-----Original Message-----
From: Jesse Pelton [mailto:jsp@PKC.com] 
Sent: Tuesday, February 06, 2007 1:02 PM
To: c-dev@xerces.apache.org
Subject: RE: parsing xml

I'm a specification reader myself, so the only materials I can suggest
are a) the XML specification (in particular
http://www.w3.org/TR/2006/REC-xml-20060816/#sec-white-space), b) the DOM
specifications (see http://www.w3.org/DOM/DOMTR; I'd probably start with
DOM Level 2 Core), c) the Xerces API documentation
(http://xml.apache.org/xerces-c/api.html), and d) the Xerces sample
applications.

I'm sure there are good introductions to XML technologies, possibly
including Xerces, but I'm not familiar with them.  O'Reilly's books
(http://www.oreilly.com) seem to be generally well-regarded.

Be warned that XML's simple appearance is deceiving.  There's a lot to
know, and ignorance today can cost you dearly tomorrow.

-----Original Message-----
From: varun.81 [mailto:varunbhatia.81@gmail.com] 
Sent: Tuesday, February 06, 2007 12:28 PM
To: c-dev@xerces.apache.org
Subject: RE: parsing xml


or if u can suggest me some material on xerces

varun.81 wrote:
> 
> So can you suggest me how i can discard white spaces even if it is
present
> in the document ?
> 
> Jesse Pelton wrote:
>> 
>> Ah.  Now we're talking.  If you put non-discardable whitespace into a
>> document, it will be included in the DOM hierarchy as text nodes.  In
>> your document, the "input" element has three child nodes: text
composed
>> entirely of whitespace, a "child" element with a single attribute
node,
>> and another whitespace text node.  Xerces is doing the proper thing.
>> 
>> I'd suggest reading an XML primer and/or reviewing the DOM
>> specification. 
>> 
>> -----Original Message-----
>> From: varun.81 [mailto:varunbhatia.81@gmail.com] 
>> Sent: Tuesday, February 06, 2007 12:00 PM
>> To: c-dev@xerces.apache.org
>> Subject: RE: parsing xml
>> 
>> 
>> when there are no spaces in my xml it gives me the proper
>> result.....root
>> element as input and number of child element as 1 but i give the xml
>> file as
>> proper tabs it gives me child elements as 3 and thus it fails. So is
>> there a
>> method to read the xml file with tabs?
>> 
>> Jesse Pelton wrote:
>>> 
>>> Attachments are allowed.  This message should have two attachments:
>> one
>>> is an input document constructed from your text (except the quotes),
>> the
>>> other is the output from DOMPrint when the first is parsed.
>>> 
>>> Does DOMPrint fail if you save either of these to disk and parse it?
>> If
>>> so, with what message? 
>>> 
>>> -----Original Message-----
>>> From: varun.81 [mailto:varunbhatia.81@gmail.com] 
>>> Sent: Tuesday, February 06, 2007 11:45 AM
>>> To: c-dev@xerces.apache.org
>>> Subject: RE: parsing xml
>>> 
>>> 
>>> "<input>
>>>         <child name="Varun">hello</child>
>>> </input>"
>>> 
>>> Motti Shneor-2 wrote:
>>>> 
>>>> Gladly. Only all my attachments were rejected by the list. Is it at
>>> all
>>>> allowed to attach files ?
>>>> 
>>>>  
>>>> 
>>>> Motti Shneor
>>>> Software Engineer
>>>> 
>>>> Orbograph Ltd.
>>>> P.O.Box 215, Yavne 81102, Israel
>>>> Tel: 972-8-9322257 ext. 230
>>>> Fax: 972-8-9328857
>>>> motti.shneor@orbograph.com
>>>>
>>
<ma...@orbograph.com>
>>> 
>>>> http://www.orbograph.com
>>>> <http://www.orbograph.com/ohttp:/www.orbograph.com/> 
>>>> 
>>>>  
>>>> 
>>>> ________________________________
>>>> 
>>>> From: Jesse Pelton [mailto:jsp@PKC.com] 
>>>> Sent: Tuesday, February 06, 2007 6:31 PM
>>>> To: c-dev@xerces.apache.org
>>>> Subject: RE: parsing xml
>>>> 
>>>>  
>>>> 
>>>> Could you attach a sample document that fails to parse? If you
embed
>>> it
>>>> in a message, it's subject to rearrangement or misinterpretation.
For
>>>> instance, my mail client displays a text box instead of your sample
>>>> document.
>>>> 
>>>>  
>>>> 
>>>> Also, please note whether sample apps like DOMParse parse the
>> document
>>>> successfully.
>>>> 
>>>>  
>>>> 
>>>> ________________________________
>>>> 
>>>> From: varun.81 [mailto:varunbhatia.81@gmail.com] 
>>>> Sent: Tuesday, February 06, 2007 11:20 AM
>>>> To: c-dev@xerces.apache.org
>>>> Subject: parsing xml
>>>> 
>>>> hi i am new to use this xerces tool.....i have to parse an xml a
very
>>>> simple one say  hello i am able to do it through an xml file, but
it
>>>> throws me an error when i try to give xml with proper indentetion
but
>>> it
>>>> works if i give xml without spaces between the tags. i will be
>> obliged
>>>> if someone can help me finding out why it fails with indentation
thnx
>>>> ps: i am writting code in C++ 
>>>> 
>>>> ________________________________
>>>> 
>>>> View this message in context: parsing xml
>>>> <http://www.nabble.com/parsing-xml-tf3181498.html#a8828911> 
>>>> Sent from the Xerces - C - Dev
>>>> <http://www.nabble.com/Xerces---C---Dev-f282.html>  mailing list
>>> archive
>>>> at Nabble.com.
>>>> 
>>>> 
>>>> 
>>> 
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/parsing-xml-tf3181498.html#a8829402
>>> Sent from the Xerces - C - Dev mailing list archive at Nabble.com.
>>> 
>>> 
>>>
---------------------------------------------------------------------
>>> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>>> For additional commands, e-mail: c-dev-help@xerces.apache.org
>>> 
>>> 
>>> <?xml version="1.0" encoding="UTF-8" standalone="no" ?><input>
>>>         <child name="Varun">hello</child>
>>> </input>
>>> <input>
>>>         <child name="Varun">hello</child>
>>> </input>
>>> 
>>>
---------------------------------------------------------------------
>>> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>>> For additional commands, e-mail: c-dev-help@xerces.apache.org
>>> 
>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/parsing-xml-tf3181498.html#a8829735
>> Sent from the Xerces - C - Dev mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>> For additional commands, e-mail: c-dev-help@xerces.apache.org
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>> For additional commands, e-mail: c-dev-help@xerces.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/parsing-xml-tf3181498.html#a8830164
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


RE: parsing xml

Posted by Jesse Pelton <js...@PKC.com>.
I'm a specification reader myself, so the only materials I can suggest
are a) the XML specification (in particular
http://www.w3.org/TR/2006/REC-xml-20060816/#sec-white-space), b) the DOM
specifications (see http://www.w3.org/DOM/DOMTR; I'd probably start with
DOM Level 2 Core), c) the Xerces API documentation
(http://xml.apache.org/xerces-c/api.html), and d) the Xerces sample
applications.

I'm sure there are good introductions to XML technologies, possibly
including Xerces, but I'm not familiar with them.  O'Reilly's books
(http://www.oreilly.com) seem to be generally well-regarded.

Be warned that XML's simple appearance is deceiving.  There's a lot to
know, and ignorance today can cost you dearly tomorrow.

-----Original Message-----
From: varun.81 [mailto:varunbhatia.81@gmail.com] 
Sent: Tuesday, February 06, 2007 12:28 PM
To: c-dev@xerces.apache.org
Subject: RE: parsing xml


or if u can suggest me some material on xerces

varun.81 wrote:
> 
> So can you suggest me how i can discard white spaces even if it is
present
> in the document ?
> 
> Jesse Pelton wrote:
>> 
>> Ah.  Now we're talking.  If you put non-discardable whitespace into a
>> document, it will be included in the DOM hierarchy as text nodes.  In
>> your document, the "input" element has three child nodes: text
composed
>> entirely of whitespace, a "child" element with a single attribute
node,
>> and another whitespace text node.  Xerces is doing the proper thing.
>> 
>> I'd suggest reading an XML primer and/or reviewing the DOM
>> specification. 
>> 
>> -----Original Message-----
>> From: varun.81 [mailto:varunbhatia.81@gmail.com] 
>> Sent: Tuesday, February 06, 2007 12:00 PM
>> To: c-dev@xerces.apache.org
>> Subject: RE: parsing xml
>> 
>> 
>> when there are no spaces in my xml it gives me the proper
>> result.....root
>> element as input and number of child element as 1 but i give the xml
>> file as
>> proper tabs it gives me child elements as 3 and thus it fails. So is
>> there a
>> method to read the xml file with tabs?
>> 
>> Jesse Pelton wrote:
>>> 
>>> Attachments are allowed.  This message should have two attachments:
>> one
>>> is an input document constructed from your text (except the quotes),
>> the
>>> other is the output from DOMPrint when the first is parsed.
>>> 
>>> Does DOMPrint fail if you save either of these to disk and parse it?
>> If
>>> so, with what message? 
>>> 
>>> -----Original Message-----
>>> From: varun.81 [mailto:varunbhatia.81@gmail.com] 
>>> Sent: Tuesday, February 06, 2007 11:45 AM
>>> To: c-dev@xerces.apache.org
>>> Subject: RE: parsing xml
>>> 
>>> 
>>> "<input>
>>>         <child name="Varun">hello</child>
>>> </input>"
>>> 
>>> Motti Shneor-2 wrote:
>>>> 
>>>> Gladly. Only all my attachments were rejected by the list. Is it at
>>> all
>>>> allowed to attach files ?
>>>> 
>>>>  
>>>> 
>>>> Motti Shneor
>>>> Software Engineer
>>>> 
>>>> Orbograph Ltd.
>>>> P.O.Box 215, Yavne 81102, Israel
>>>> Tel: 972-8-9322257 ext. 230
>>>> Fax: 972-8-9328857
>>>> motti.shneor@orbograph.com
>>>>
>>
<ma...@orbograph.com>
>>> 
>>>> http://www.orbograph.com
>>>> <http://www.orbograph.com/ohttp:/www.orbograph.com/> 
>>>> 
>>>>  
>>>> 
>>>> ________________________________
>>>> 
>>>> From: Jesse Pelton [mailto:jsp@PKC.com] 
>>>> Sent: Tuesday, February 06, 2007 6:31 PM
>>>> To: c-dev@xerces.apache.org
>>>> Subject: RE: parsing xml
>>>> 
>>>>  
>>>> 
>>>> Could you attach a sample document that fails to parse? If you
embed
>>> it
>>>> in a message, it's subject to rearrangement or misinterpretation.
For
>>>> instance, my mail client displays a text box instead of your sample
>>>> document.
>>>> 
>>>>  
>>>> 
>>>> Also, please note whether sample apps like DOMParse parse the
>> document
>>>> successfully.
>>>> 
>>>>  
>>>> 
>>>> ________________________________
>>>> 
>>>> From: varun.81 [mailto:varunbhatia.81@gmail.com] 
>>>> Sent: Tuesday, February 06, 2007 11:20 AM
>>>> To: c-dev@xerces.apache.org
>>>> Subject: parsing xml
>>>> 
>>>> hi i am new to use this xerces tool.....i have to parse an xml a
very
>>>> simple one say  hello i am able to do it through an xml file, but
it
>>>> throws me an error when i try to give xml with proper indentetion
but
>>> it
>>>> works if i give xml without spaces between the tags. i will be
>> obliged
>>>> if someone can help me finding out why it fails with indentation
thnx
>>>> ps: i am writting code in C++ 
>>>> 
>>>> ________________________________
>>>> 
>>>> View this message in context: parsing xml
>>>> <http://www.nabble.com/parsing-xml-tf3181498.html#a8828911> 
>>>> Sent from the Xerces - C - Dev
>>>> <http://www.nabble.com/Xerces---C---Dev-f282.html>  mailing list
>>> archive
>>>> at Nabble.com.
>>>> 
>>>> 
>>>> 
>>> 
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/parsing-xml-tf3181498.html#a8829402
>>> Sent from the Xerces - C - Dev mailing list archive at Nabble.com.
>>> 
>>> 
>>>
---------------------------------------------------------------------
>>> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>>> For additional commands, e-mail: c-dev-help@xerces.apache.org
>>> 
>>> 
>>> <?xml version="1.0" encoding="UTF-8" standalone="no" ?><input>
>>>         <child name="Varun">hello</child>
>>> </input>
>>> <input>
>>>         <child name="Varun">hello</child>
>>> </input>
>>> 
>>>
---------------------------------------------------------------------
>>> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>>> For additional commands, e-mail: c-dev-help@xerces.apache.org
>>> 
>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/parsing-xml-tf3181498.html#a8829735
>> Sent from the Xerces - C - Dev mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>> For additional commands, e-mail: c-dev-help@xerces.apache.org
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>> For additional commands, e-mail: c-dev-help@xerces.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/parsing-xml-tf3181498.html#a8830164
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


RE: parsing xml

Posted by "varun.81" <va...@gmail.com>.
or if u can suggest me some material on xerces

varun.81 wrote:
> 
> So can you suggest me how i can discard white spaces even if it is present
> in the document ?
> 
> Jesse Pelton wrote:
>> 
>> Ah.  Now we're talking.  If you put non-discardable whitespace into a
>> document, it will be included in the DOM hierarchy as text nodes.  In
>> your document, the "input" element has three child nodes: text composed
>> entirely of whitespace, a "child" element with a single attribute node,
>> and another whitespace text node.  Xerces is doing the proper thing.
>> 
>> I'd suggest reading an XML primer and/or reviewing the DOM
>> specification. 
>> 
>> -----Original Message-----
>> From: varun.81 [mailto:varunbhatia.81@gmail.com] 
>> Sent: Tuesday, February 06, 2007 12:00 PM
>> To: c-dev@xerces.apache.org
>> Subject: RE: parsing xml
>> 
>> 
>> when there are no spaces in my xml it gives me the proper
>> result.....root
>> element as input and number of child element as 1 but i give the xml
>> file as
>> proper tabs it gives me child elements as 3 and thus it fails. So is
>> there a
>> method to read the xml file with tabs?
>> 
>> Jesse Pelton wrote:
>>> 
>>> Attachments are allowed.  This message should have two attachments:
>> one
>>> is an input document constructed from your text (except the quotes),
>> the
>>> other is the output from DOMPrint when the first is parsed.
>>> 
>>> Does DOMPrint fail if you save either of these to disk and parse it?
>> If
>>> so, with what message? 
>>> 
>>> -----Original Message-----
>>> From: varun.81 [mailto:varunbhatia.81@gmail.com] 
>>> Sent: Tuesday, February 06, 2007 11:45 AM
>>> To: c-dev@xerces.apache.org
>>> Subject: RE: parsing xml
>>> 
>>> 
>>> "<input>
>>>         <child name="Varun">hello</child>
>>> </input>"
>>> 
>>> Motti Shneor-2 wrote:
>>>> 
>>>> Gladly. Only all my attachments were rejected by the list. Is it at
>>> all
>>>> allowed to attach files ?
>>>> 
>>>>  
>>>> 
>>>> Motti Shneor
>>>> Software Engineer
>>>> 
>>>> Orbograph Ltd.
>>>> P.O.Box 215, Yavne 81102, Israel
>>>> Tel: 972-8-9322257 ext. 230
>>>> Fax: 972-8-9328857
>>>> motti.shneor@orbograph.com
>>>>
>> <ma...@orbograph.com>
>>> 
>>>> http://www.orbograph.com
>>>> <http://www.orbograph.com/ohttp:/www.orbograph.com/> 
>>>> 
>>>>  
>>>> 
>>>> ________________________________
>>>> 
>>>> From: Jesse Pelton [mailto:jsp@PKC.com] 
>>>> Sent: Tuesday, February 06, 2007 6:31 PM
>>>> To: c-dev@xerces.apache.org
>>>> Subject: RE: parsing xml
>>>> 
>>>>  
>>>> 
>>>> Could you attach a sample document that fails to parse? If you embed
>>> it
>>>> in a message, it's subject to rearrangement or misinterpretation. For
>>>> instance, my mail client displays a text box instead of your sample
>>>> document.
>>>> 
>>>>  
>>>> 
>>>> Also, please note whether sample apps like DOMParse parse the
>> document
>>>> successfully.
>>>> 
>>>>  
>>>> 
>>>> ________________________________
>>>> 
>>>> From: varun.81 [mailto:varunbhatia.81@gmail.com] 
>>>> Sent: Tuesday, February 06, 2007 11:20 AM
>>>> To: c-dev@xerces.apache.org
>>>> Subject: parsing xml
>>>> 
>>>> hi i am new to use this xerces tool.....i have to parse an xml a very
>>>> simple one say  hello i am able to do it through an xml file, but it
>>>> throws me an error when i try to give xml with proper indentetion but
>>> it
>>>> works if i give xml without spaces between the tags. i will be
>> obliged
>>>> if someone can help me finding out why it fails with indentation thnx
>>>> ps: i am writting code in C++ 
>>>> 
>>>> ________________________________
>>>> 
>>>> View this message in context: parsing xml
>>>> <http://www.nabble.com/parsing-xml-tf3181498.html#a8828911> 
>>>> Sent from the Xerces - C - Dev
>>>> <http://www.nabble.com/Xerces---C---Dev-f282.html>  mailing list
>>> archive
>>>> at Nabble.com.
>>>> 
>>>> 
>>>> 
>>> 
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/parsing-xml-tf3181498.html#a8829402
>>> Sent from the Xerces - C - Dev mailing list archive at Nabble.com.
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>>> For additional commands, e-mail: c-dev-help@xerces.apache.org
>>> 
>>> 
>>> <?xml version="1.0" encoding="UTF-8" standalone="no" ?><input>
>>>         <child name="Varun">hello</child>
>>> </input>
>>> <input>
>>>         <child name="Varun">hello</child>
>>> </input>
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>>> For additional commands, e-mail: c-dev-help@xerces.apache.org
>>> 
>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/parsing-xml-tf3181498.html#a8829735
>> Sent from the Xerces - C - Dev mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>> For additional commands, e-mail: c-dev-help@xerces.apache.org
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>> For additional commands, e-mail: c-dev-help@xerces.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/parsing-xml-tf3181498.html#a8830164
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


RE: parsing xml

Posted by "varun.81" <va...@gmail.com>.
So can you suggest me how i can discard white spaces even if it is present in
the document ?

Jesse Pelton wrote:
> 
> Ah.  Now we're talking.  If you put non-discardable whitespace into a
> document, it will be included in the DOM hierarchy as text nodes.  In
> your document, the "input" element has three child nodes: text composed
> entirely of whitespace, a "child" element with a single attribute node,
> and another whitespace text node.  Xerces is doing the proper thing.
> 
> I'd suggest reading an XML primer and/or reviewing the DOM
> specification. 
> 
> -----Original Message-----
> From: varun.81 [mailto:varunbhatia.81@gmail.com] 
> Sent: Tuesday, February 06, 2007 12:00 PM
> To: c-dev@xerces.apache.org
> Subject: RE: parsing xml
> 
> 
> when there are no spaces in my xml it gives me the proper
> result.....root
> element as input and number of child element as 1 but i give the xml
> file as
> proper tabs it gives me child elements as 3 and thus it fails. So is
> there a
> method to read the xml file with tabs?
> 
> Jesse Pelton wrote:
>> 
>> Attachments are allowed.  This message should have two attachments:
> one
>> is an input document constructed from your text (except the quotes),
> the
>> other is the output from DOMPrint when the first is parsed.
>> 
>> Does DOMPrint fail if you save either of these to disk and parse it?
> If
>> so, with what message? 
>> 
>> -----Original Message-----
>> From: varun.81 [mailto:varunbhatia.81@gmail.com] 
>> Sent: Tuesday, February 06, 2007 11:45 AM
>> To: c-dev@xerces.apache.org
>> Subject: RE: parsing xml
>> 
>> 
>> "<input>
>>         <child name="Varun">hello</child>
>> </input>"
>> 
>> Motti Shneor-2 wrote:
>>> 
>>> Gladly. Only all my attachments were rejected by the list. Is it at
>> all
>>> allowed to attach files ?
>>> 
>>>  
>>> 
>>> Motti Shneor
>>> Software Engineer
>>> 
>>> Orbograph Ltd.
>>> P.O.Box 215, Yavne 81102, Israel
>>> Tel: 972-8-9322257 ext. 230
>>> Fax: 972-8-9328857
>>> motti.shneor@orbograph.com
>>>
> <ma...@orbograph.com>
>> 
>>> http://www.orbograph.com
>>> <http://www.orbograph.com/ohttp:/www.orbograph.com/> 
>>> 
>>>  
>>> 
>>> ________________________________
>>> 
>>> From: Jesse Pelton [mailto:jsp@PKC.com] 
>>> Sent: Tuesday, February 06, 2007 6:31 PM
>>> To: c-dev@xerces.apache.org
>>> Subject: RE: parsing xml
>>> 
>>>  
>>> 
>>> Could you attach a sample document that fails to parse? If you embed
>> it
>>> in a message, it's subject to rearrangement or misinterpretation. For
>>> instance, my mail client displays a text box instead of your sample
>>> document.
>>> 
>>>  
>>> 
>>> Also, please note whether sample apps like DOMParse parse the
> document
>>> successfully.
>>> 
>>>  
>>> 
>>> ________________________________
>>> 
>>> From: varun.81 [mailto:varunbhatia.81@gmail.com] 
>>> Sent: Tuesday, February 06, 2007 11:20 AM
>>> To: c-dev@xerces.apache.org
>>> Subject: parsing xml
>>> 
>>> hi i am new to use this xerces tool.....i have to parse an xml a very
>>> simple one say  hello i am able to do it through an xml file, but it
>>> throws me an error when i try to give xml with proper indentetion but
>> it
>>> works if i give xml without spaces between the tags. i will be
> obliged
>>> if someone can help me finding out why it fails with indentation thnx
>>> ps: i am writting code in C++ 
>>> 
>>> ________________________________
>>> 
>>> View this message in context: parsing xml
>>> <http://www.nabble.com/parsing-xml-tf3181498.html#a8828911> 
>>> Sent from the Xerces - C - Dev
>>> <http://www.nabble.com/Xerces---C---Dev-f282.html>  mailing list
>> archive
>>> at Nabble.com.
>>> 
>>> 
>>> 
>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/parsing-xml-tf3181498.html#a8829402
>> Sent from the Xerces - C - Dev mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>> For additional commands, e-mail: c-dev-help@xerces.apache.org
>> 
>> 
>> <?xml version="1.0" encoding="UTF-8" standalone="no" ?><input>
>>         <child name="Varun">hello</child>
>> </input>
>> <input>
>>         <child name="Varun">hello</child>
>> </input>
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>> For additional commands, e-mail: c-dev-help@xerces.apache.org
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/parsing-xml-tf3181498.html#a8829735
> Sent from the Xerces - C - Dev mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/parsing-xml-tf3181498.html#a8830139
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


RE: parsing xml

Posted by Jesse Pelton <js...@PKC.com>.
Ah.  Now we're talking.  If you put non-discardable whitespace into a
document, it will be included in the DOM hierarchy as text nodes.  In
your document, the "input" element has three child nodes: text composed
entirely of whitespace, a "child" element with a single attribute node,
and another whitespace text node.  Xerces is doing the proper thing.

I'd suggest reading an XML primer and/or reviewing the DOM
specification. 

-----Original Message-----
From: varun.81 [mailto:varunbhatia.81@gmail.com] 
Sent: Tuesday, February 06, 2007 12:00 PM
To: c-dev@xerces.apache.org
Subject: RE: parsing xml


when there are no spaces in my xml it gives me the proper
result.....root
element as input and number of child element as 1 but i give the xml
file as
proper tabs it gives me child elements as 3 and thus it fails. So is
there a
method to read the xml file with tabs?

Jesse Pelton wrote:
> 
> Attachments are allowed.  This message should have two attachments:
one
> is an input document constructed from your text (except the quotes),
the
> other is the output from DOMPrint when the first is parsed.
> 
> Does DOMPrint fail if you save either of these to disk and parse it?
If
> so, with what message? 
> 
> -----Original Message-----
> From: varun.81 [mailto:varunbhatia.81@gmail.com] 
> Sent: Tuesday, February 06, 2007 11:45 AM
> To: c-dev@xerces.apache.org
> Subject: RE: parsing xml
> 
> 
> "<input>
>         <child name="Varun">hello</child>
> </input>"
> 
> Motti Shneor-2 wrote:
>> 
>> Gladly. Only all my attachments were rejected by the list. Is it at
> all
>> allowed to attach files ?
>> 
>>  
>> 
>> Motti Shneor
>> Software Engineer
>> 
>> Orbograph Ltd.
>> P.O.Box 215, Yavne 81102, Israel
>> Tel: 972-8-9322257 ext. 230
>> Fax: 972-8-9328857
>> motti.shneor@orbograph.com
>>
<ma...@orbograph.com>
> 
>> http://www.orbograph.com
>> <http://www.orbograph.com/ohttp:/www.orbograph.com/> 
>> 
>>  
>> 
>> ________________________________
>> 
>> From: Jesse Pelton [mailto:jsp@PKC.com] 
>> Sent: Tuesday, February 06, 2007 6:31 PM
>> To: c-dev@xerces.apache.org
>> Subject: RE: parsing xml
>> 
>>  
>> 
>> Could you attach a sample document that fails to parse? If you embed
> it
>> in a message, it's subject to rearrangement or misinterpretation. For
>> instance, my mail client displays a text box instead of your sample
>> document.
>> 
>>  
>> 
>> Also, please note whether sample apps like DOMParse parse the
document
>> successfully.
>> 
>>  
>> 
>> ________________________________
>> 
>> From: varun.81 [mailto:varunbhatia.81@gmail.com] 
>> Sent: Tuesday, February 06, 2007 11:20 AM
>> To: c-dev@xerces.apache.org
>> Subject: parsing xml
>> 
>> hi i am new to use this xerces tool.....i have to parse an xml a very
>> simple one say  hello i am able to do it through an xml file, but it
>> throws me an error when i try to give xml with proper indentetion but
> it
>> works if i give xml without spaces between the tags. i will be
obliged
>> if someone can help me finding out why it fails with indentation thnx
>> ps: i am writting code in C++ 
>> 
>> ________________________________
>> 
>> View this message in context: parsing xml
>> <http://www.nabble.com/parsing-xml-tf3181498.html#a8828911> 
>> Sent from the Xerces - C - Dev
>> <http://www.nabble.com/Xerces---C---Dev-f282.html>  mailing list
> archive
>> at Nabble.com.
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/parsing-xml-tf3181498.html#a8829402
> Sent from the Xerces - C - Dev mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
> 
> 
> <?xml version="1.0" encoding="UTF-8" standalone="no" ?><input>
>         <child name="Varun">hello</child>
> </input>
> <input>
>         <child name="Varun">hello</child>
> </input>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
> 

-- 
View this message in context:
http://www.nabble.com/parsing-xml-tf3181498.html#a8829735
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


RE: parsing xml

Posted by "varun.81" <va...@gmail.com>.
when there are no spaces in my xml it gives me the proper result.....root
element as input and number of child element as 1 but i give the xml file as
proper tabs it gives me child elements as 3 and thus it fails. So is there a
method to read the xml file with tabs?

Jesse Pelton wrote:
> 
> Attachments are allowed.  This message should have two attachments: one
> is an input document constructed from your text (except the quotes), the
> other is the output from DOMPrint when the first is parsed.
> 
> Does DOMPrint fail if you save either of these to disk and parse it?  If
> so, with what message? 
> 
> -----Original Message-----
> From: varun.81 [mailto:varunbhatia.81@gmail.com] 
> Sent: Tuesday, February 06, 2007 11:45 AM
> To: c-dev@xerces.apache.org
> Subject: RE: parsing xml
> 
> 
> "<input>
>         <child name="Varun">hello</child>
> </input>"
> 
> Motti Shneor-2 wrote:
>> 
>> Gladly. Only all my attachments were rejected by the list. Is it at
> all
>> allowed to attach files ?
>> 
>>  
>> 
>> Motti Shneor
>> Software Engineer
>> 
>> Orbograph Ltd.
>> P.O.Box 215, Yavne 81102, Israel
>> Tel: 972-8-9322257 ext. 230
>> Fax: 972-8-9328857
>> motti.shneor@orbograph.com
>> <ma...@orbograph.com>
> 
>> http://www.orbograph.com
>> <http://www.orbograph.com/ohttp:/www.orbograph.com/> 
>> 
>>  
>> 
>> ________________________________
>> 
>> From: Jesse Pelton [mailto:jsp@PKC.com] 
>> Sent: Tuesday, February 06, 2007 6:31 PM
>> To: c-dev@xerces.apache.org
>> Subject: RE: parsing xml
>> 
>>  
>> 
>> Could you attach a sample document that fails to parse? If you embed
> it
>> in a message, it's subject to rearrangement or misinterpretation. For
>> instance, my mail client displays a text box instead of your sample
>> document.
>> 
>>  
>> 
>> Also, please note whether sample apps like DOMParse parse the document
>> successfully.
>> 
>>  
>> 
>> ________________________________
>> 
>> From: varun.81 [mailto:varunbhatia.81@gmail.com] 
>> Sent: Tuesday, February 06, 2007 11:20 AM
>> To: c-dev@xerces.apache.org
>> Subject: parsing xml
>> 
>> hi i am new to use this xerces tool.....i have to parse an xml a very
>> simple one say  hello i am able to do it through an xml file, but it
>> throws me an error when i try to give xml with proper indentetion but
> it
>> works if i give xml without spaces between the tags. i will be obliged
>> if someone can help me finding out why it fails with indentation thnx
>> ps: i am writting code in C++ 
>> 
>> ________________________________
>> 
>> View this message in context: parsing xml
>> <http://www.nabble.com/parsing-xml-tf3181498.html#a8828911> 
>> Sent from the Xerces - C - Dev
>> <http://www.nabble.com/Xerces---C---Dev-f282.html>  mailing list
> archive
>> at Nabble.com.
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/parsing-xml-tf3181498.html#a8829402
> Sent from the Xerces - C - Dev mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
> 
> 
> <?xml version="1.0" encoding="UTF-8" standalone="no" ?><input>
>         <child name="Varun">hello</child>
> </input>
> <input>
>         <child name="Varun">hello</child>
> </input>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
> 

-- 
View this message in context: http://www.nabble.com/parsing-xml-tf3181498.html#a8829735
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


RE: parsing xml

Posted by Jesse Pelton <js...@PKC.com>.
Attachments are allowed.  This message should have two attachments: one
is an input document constructed from your text (except the quotes), the
other is the output from DOMPrint when the first is parsed.

Does DOMPrint fail if you save either of these to disk and parse it?  If
so, with what message? 

-----Original Message-----
From: varun.81 [mailto:varunbhatia.81@gmail.com] 
Sent: Tuesday, February 06, 2007 11:45 AM
To: c-dev@xerces.apache.org
Subject: RE: parsing xml


"<input>
        <child name="Varun">hello</child>
</input>"

Motti Shneor-2 wrote:
> 
> Gladly. Only all my attachments were rejected by the list. Is it at
all
> allowed to attach files ?
> 
>  
> 
> Motti Shneor
> Software Engineer
> 
> Orbograph Ltd.
> P.O.Box 215, Yavne 81102, Israel
> Tel: 972-8-9322257 ext. 230
> Fax: 972-8-9328857
> motti.shneor@orbograph.com
> <ma...@orbograph.com>

> http://www.orbograph.com
> <http://www.orbograph.com/ohttp:/www.orbograph.com/> 
> 
>  
> 
> ________________________________
> 
> From: Jesse Pelton [mailto:jsp@PKC.com] 
> Sent: Tuesday, February 06, 2007 6:31 PM
> To: c-dev@xerces.apache.org
> Subject: RE: parsing xml
> 
>  
> 
> Could you attach a sample document that fails to parse? If you embed
it
> in a message, it's subject to rearrangement or misinterpretation. For
> instance, my mail client displays a text box instead of your sample
> document.
> 
>  
> 
> Also, please note whether sample apps like DOMParse parse the document
> successfully.
> 
>  
> 
> ________________________________
> 
> From: varun.81 [mailto:varunbhatia.81@gmail.com] 
> Sent: Tuesday, February 06, 2007 11:20 AM
> To: c-dev@xerces.apache.org
> Subject: parsing xml
> 
> hi i am new to use this xerces tool.....i have to parse an xml a very
> simple one say  hello i am able to do it through an xml file, but it
> throws me an error when i try to give xml with proper indentetion but
it
> works if i give xml without spaces between the tags. i will be obliged
> if someone can help me finding out why it fails with indentation thnx
> ps: i am writting code in C++ 
> 
> ________________________________
> 
> View this message in context: parsing xml
> <http://www.nabble.com/parsing-xml-tf3181498.html#a8828911> 
> Sent from the Xerces - C - Dev
> <http://www.nabble.com/Xerces---C---Dev-f282.html>  mailing list
archive
> at Nabble.com.
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/parsing-xml-tf3181498.html#a8829402
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


RE: parsing xml

Posted by "varun.81" <va...@gmail.com>.
"<input>
        <child name="Varun">hello</child>
</input>"

Motti Shneor-2 wrote:
> 
> Gladly. Only all my attachments were rejected by the list. Is it at all
> allowed to attach files ?
> 
>  
> 
> Motti Shneor
> Software Engineer
> 
> Orbograph Ltd.
> P.O.Box 215, Yavne 81102, Israel
> Tel: 972-8-9322257 ext. 230
> Fax: 972-8-9328857
> motti.shneor@orbograph.com
> <ma...@orbograph.com> 
> http://www.orbograph.com
> <http://www.orbograph.com/ohttp:/www.orbograph.com/> 
> 
>  
> 
> ________________________________
> 
> From: Jesse Pelton [mailto:jsp@PKC.com] 
> Sent: Tuesday, February 06, 2007 6:31 PM
> To: c-dev@xerces.apache.org
> Subject: RE: parsing xml
> 
>  
> 
> Could you attach a sample document that fails to parse? If you embed it
> in a message, it's subject to rearrangement or misinterpretation. For
> instance, my mail client displays a text box instead of your sample
> document.
> 
>  
> 
> Also, please note whether sample apps like DOMParse parse the document
> successfully.
> 
>  
> 
> ________________________________
> 
> From: varun.81 [mailto:varunbhatia.81@gmail.com] 
> Sent: Tuesday, February 06, 2007 11:20 AM
> To: c-dev@xerces.apache.org
> Subject: parsing xml
> 
> hi i am new to use this xerces tool.....i have to parse an xml a very
> simple one say  hello i am able to do it through an xml file, but it
> throws me an error when i try to give xml with proper indentetion but it
> works if i give xml without spaces between the tags. i will be obliged
> if someone can help me finding out why it fails with indentation thnx
> ps: i am writting code in C++ 
> 
> ________________________________
> 
> View this message in context: parsing xml
> <http://www.nabble.com/parsing-xml-tf3181498.html#a8828911> 
> Sent from the Xerces - C - Dev
> <http://www.nabble.com/Xerces---C---Dev-f282.html>  mailing list archive
> at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/parsing-xml-tf3181498.html#a8829402
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org