Trooper80
asked on
Parsing an XML with no consistent element names
Hello everybody
I am trying to find an XML parsing tool that allows to parse documents which contain elements with no consistent names. e.g
<root>
<child1 name="name1" />
<child2 name="name2" />
</root>
As you see child element is not consistent. I tried to use XStream but it doesn't work for me because it stores aliases in a map together with the values which are class names.
xstream.alias("child", Child.class);
I am looking for something that would allow me to give Regular Expressions as aliases.
Any help with some example or something?
Thank you in advance
I am trying to find an XML parsing tool that allows to parse documents which contain elements with no consistent names. e.g
<root>
<child1 name="name1" />
<child2 name="name2" />
</root>
As you see child element is not consistent. I tried to use XStream but it doesn't work for me because it stores aliases in a map together with the values which are class names.
xstream.alias("child", Child.class);
I am looking for something that would allow me to give Regular Expressions as aliases.
Any help with some example or something?
Thank you in advance
ASKER
I actually need a library that does this for me through my program
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Actually u were right it's not an XML. I modified the XStream parser and I managed to make it work with regex but I just decided it;s just not right. So I came here and I saw your answer after a month.
I will give u the points no prob.
I will give u the points no prob.
ok
stylus studio has one of the best XML parsing tool
http://www.stylusstudio.com/