how to get line/column from xml?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to get line/column from xml?

Adam Heath-2
Anyone know how to get line/column numbers from xml, using standard
DOM/SAX interfaces?  The reason why, is that I have a patch against
minilang that encodes the filename/methodname into the classes, so
that stack traces are easier to understand.  As in:

--
     [java]
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:221)
     [java]
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:173)
     [java]
org.ofbiz.minilang.method.callops.CallService.exec(CallService.java:244)
     [java]
_$gen.file_58$.home.adam.code.upstream.ofbiz.ofbiz_45$svk.applications.product.script.org.ofbiz.shipment.test.TestServices_46$xml_35$testPackingServices.exec(file:/home/adam/code/upstream/ofbiz/ofbiz-svk/applications/product/script/org/ofbiz/shipment/test/TestServices.xml#testPackingServices)
     [java]
org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:943)
     [java] org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:768)
     [java]
_$gen.file_58$.home.adam.code.upstream.ofbiz.ofbiz_45$svk.applications.product.script.org.ofbiz.shipment.test.TestServices_46$xml.exec(file:/home/adam/code/upstream/ofbiz/ofbiz-svk/applications/product/script/org/ofbiz/shipment/test/TestServices.xml)
     [java]
org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:160)
     [java]
org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:136)
--

ps: this is the first deeper integration to come from the webslinger
world.  The above is based on asm.
Reply | Threaded
Open this post in threaded view
|

Re: how to get line/column from xml?

Christian Geisert
Adam Heath schrieb:
> Anyone know how to get line/column numbers from xml, using standard
> DOM/SAX interfaces?  The reason why, is that I have a patch against

http://java.sun.com/j2se/1.5.0/docs/api/org/xml/sax/Locator.html ?

Christian
Reply | Threaded
Open this post in threaded view
|

Re: how to get line/column from xml?

Adam Heath-2
Christian Geisert wrote:
> Adam Heath schrieb:
>> Anyone know how to get line/column numbers from xml, using standard
>> DOM/SAX interfaces?  The reason why, is that I have a patch against
>
> http://java.sun.com/j2se/1.5.0/docs/api/org/xml/sax/Locator.html ?

Except how to get that when the output is DOM?