Link to home
Start Free TrialLog in
Avatar of Trooper80
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
Avatar of Chandan_Gowda
Chandan_Gowda
Flag of United States of America image

Please follw the link
stylus studio has one of the best XML parsing tool
http://www.stylusstudio.com/
Avatar of Trooper80
Trooper80

ASKER

I actually need a library that does this for me through my program
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
ok