attribute location 2003-03-25 - By Ron Rothblum
Is there a way to find the location (line and more importantly column) of an attribute using the dom parser? for example if we have a node such as:
<an_element an_attribute="the attributes value">
we could find the location of both the name ("an attribute") of the attribute and the value("the attributes value). A possible way to do this is to override the startElement method of the dom parser, this method receives as a parameter an array of the attributes of the element so I could theoretically just measure the length of the strings (name and value) and calculate the place of each attribute. This method it is not very elegant and any extra whitespace will result in a wrong result. Suggestions?
Ron Rothblum.
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
|
|