Decker87 Posted May 28, 2009 Share Posted May 28, 2009 (edited) I have an XML document similar in form to this:<directory name="1.0"> <file name="ahv.exe"/> <file name="help.html"/> <file name="help.jpg"/> <directory name="Resources"> <directory name="en"> <file name="crossProductLinkError.html"/> <file name="HelpViewerStrings.dat"/> <file name="linkError.html"/> </directory> </directory> </directory>Is there some syntax I am unaware of for selecting attributes from the N'th child node of specified type (type meaning file or directory in this example)? Clearly, a simple XPath like "directory/directory/directory/file" is not appropriate here.EDIT: How embarassing! I figured out all I had to do was use [n] to specify the n'th child node in the XPath, like "directory[1]/directory[1]/directory[1]/file[1]"BUUUUT...I do have another problem. I can't seem to use the XML DOM functions right to get, for example, the name of the first directory. What should I use in _XMLGetAttrib? Edited May 28, 2009 by Decker87 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now