This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Microsoft XML > February 2004 > Using XPath to create new XML element/attribute?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Using XPath to create new XML element/attribute?
|
|
|
| We could XPath to query the specific element/attribute in an XML doc. Shou we be able to create XML element/attriubute using XPath?
For Example, using following xpath to create Id attribute directly in a XML Doc.
"inputfields/inputfield[position()='2']/@Id"
Or we need to create inputfields, inputfield, and Id one by one in CreateNode....?
Thanks,
Jim
| |
| Chris Barber 2004-02-27, 2:30 pm |
| XPath is a selection tool, not a creation tool.
You can select the relevant node using Xpath but you would then have to
create the attribute 'manually' using the DOM methods.
Chris.
"Jim" <anonymous@discussions.microsoft.com> wrote in message
news:F09F0F85-ED39-4AE9-A14F-52E917D46DBE@microsoft.com...
We could XPath to query the specific element/attribute in an XML doc. Shou
we be able to create XML element/attriubute using XPath?
For Example, using following xpath to create Id attribute directly in a XML
Doc.
"inputfields/inputfield[position()='2']/@Id"
Or we need to create inputfields, inputfield, and Id one by one in
CreateNode....?
Thanks,
Jim
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|