Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attributes Names of an Element

Status
Not open for further replies.

KMART1219

Programmer
Oct 15, 2007
2
US
How to retrieve the attribute names not the value of an element. Attribute name is not known at run time.

 
This is not a well-posed question. What is the technology involved in the generating and reading?
 
I am utilizing PL/SQL from an ORACLE database. Pulling XML from a CLOB. What is am attempting to do is validate that the Thousands of XML have the correct attributes for each element. Therefore what I was attempting to ask is How do I get the Attribute Names not the value of the attribute.

Thank You
Ken Martin
972-978-3468
 
The fully enpowered tool to do validation is schema: but you need to have one. If you pull xml out as a textstream or saved to a string variable, you can load it to a dom parser and apply all the xpath method to get all the attributes (such as "//@*"). Thereafter, you know all the names of all the attributes in the document; and its value and its owner... Thereby, you can write short focused validation on specific part of the document.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top