Thursday, 8 August 2013

How to get the node number?

How to get the node number?

I am using the dom package to parse the XML file. How to get the line
number of the XML node while handling it? So for example some attributes
should be integers, but set as floating-point numbers, so error message
will be something like this:
error while parsing xml file(line 3): number must be integer
<Top>
<Name name='name' />
<Group number='1.56'> <---- error: number must be integer.
<Member name='name1' test='test1' l='100'/>
</Group>
</Top>

No comments:

Post a Comment