Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

xml parsing

xml parsing

xml parsing

I am an xml novice so apologies up front if my question is - well - stupid.

I am investigating a C program that uses the libxml2 xmlreader to parse a string containing an xml message.

The structure of the xml message currently contains elements and attributes arranged as follows:

<Value>MR JON DOE</Value>

Theres is an intention to change the arrangement of elements and attributes as follows:


(No doubt there are terms that describe these different formats but I don't know what they are)

My question is: is it likely that the libxml2 xmlreader will correctly parse the new format?

Our system configuration does not allow us to set up a test scenario without a significant overhead so, at this stage, our intention is to wait until the new xml message is up and running in our development environment and then try it and see what happens.

Any help would be gratefully appreciated.


RE: xml parsing

From the standpoint of XML qua XML, there is no problem with the new format, as it appears to conform to the requirements of the XML specification for a well-formed XML document.

Of course, your application will be tied to a specific layout of the XML document (element names and attribute names, teee structure), and the new document does not conform to this layout. So, you application will require changes.

If the XXXXXXXX in your example is some dynamic value that changes fom document tp document, then it is an odd XML document - quite an outlier. The original document reminds me of some of the XML documents one sees in payment systems, a rather literal transliteration of the older text files used.

Welcome to Tek-Tips!

Tom Morrison
Hill Country Software

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close