0

How to use XmlElement or XmlHelper to parse general purpose XML file?

asked 2014-07-26 05:28:57 -0700

trandatnh gravatar image

I found the class XmlElement and XmlHelper in alljoyn_core but there is no API reference for it.

How to use XmlElement or XmlHelper to parse a general purpose XML like the one bellow.

<?xml version='1.0' encoding='us-ascii'?>
<data>
    <attribute1>attribute1-data</attribute1tt1>
    <attribute2>attribute2-data</attribute2>
    <attribute3>
        <sub-1>1</sub-1>
        <sub-2>2</sub-2>
    </attribute3>
</data>

The XML attributes may be changed. i.e: the attribute name, the number of attributes may increase or decrease or the attribute may or may not have child.

Thanks

edit retag flag offensive close merge delete

Comments

Are you intending to use this as a means to avoid writing a parser yourself without using AllJoyn?

bspencer ( 2014-07-28 13:42:31 -0700 )edit

I intend to re-use the Alljoyn XML parser to parse my XML file, not the Introspection XML. Just want to save time using another XML parser.

trandatnh ( 2014-07-28 17:44:19 -0700 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-07-28 13:42:22 -0700

bspencer gravatar image

The XML parser inside of AllJoyn Core is not general purpose and is specific to the project. It's function is to parse the Introspection XML returned when executing an Introspection request.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2014-07-26 05:28:57 -0700

Seen: 110 times

Last updated: Jul 28 '14