dalleyasaurus Posted January 31, 2011 Share Posted January 31, 2011 I think I'm using simple xml wrong I'm trying to read strings of xml and get it to list the "attributes" in the strings but it's not working. How would I read and list the attributes of this string <Address><to>Joshua</to><from>Rockhampton</from><country>Australia</county></Address> It needs to out put a string that can be printed and look like (or something like) to:Joshua from:Rockhampton country:Australia All my code produces errors and the page just goes blank and I don't know what is wrong.l Quote Link to comment Share on other sites More sharing options...
ldb358 Posted January 31, 2011 Share Posted January 31, 2011 post the code and maybe someone can help you find what is going wrong. Quote Link to comment Share on other sites More sharing options...
MatthewJ Posted January 31, 2011 Share Posted January 31, 2011 There are no attributes in the string you posted... In this example name would be the attribute, with a value of test <tag name="test">Tag 1</tag> so you shouldn't be trying to get attributes. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.