XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] Line number of a node

The Saxon tree model allows you to store line numbers if you set an
appropriate flag when building the tree. But this is a read-only model -
it's suitable if most of your access is through XPath but you might not want
to use it otherwise.

XOM allows you to define subclasses of the standard node classes so that
extra information can be stored, this would allow you to capture the line
numbers from SAX while building the tree. However, this involves writing
your own node factory class.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Beatriz San Miguel González [mailto:beuchisan@hotmail.com] 
> Sent: 20 December 2006 15:38
> To: mike@saxonica.com; xml-dev@lists.xml.org
> Subject: RE: [xml-dev] Line number of a node
> 
> I don't know what API can be useful. I have used SAX, dom and 
> dom4j but it's don't work. I have read about XOM and I think 
> that it's not possible.
> I need some suggestion about what API I can use. The only 
> requirement is to use Java.
> 
> Thanks!
> 
> 
> >From: "Michael Kay" <mike@saxonica.com>
> >To: 'Beatriz San Miguel González' 
> ><beuchisan@hotmail.com>,<xml-dev@lists.xml.org>
> >Subject: RE: [xml-dev] Line number of a node
> >Date: Wed, 20 Dec 2006 15:25:57 -0000
> >
> > >
> > > Is  there is a way to find out the line number of a node?
> > >
> >
> >It rather depends on what API you are using. In the DOM API, 
> I believe 
> >the answer is no.
> >
> >Michael Kay
> >http://www.saxonica.com/
> >
> >
> >_____________________________________________________________
> __________
> >
> >XML-DEV is a publicly archived, unmoderated list hosted by OASIS to 
> >support XML implementation and development. To minimize spam in the 
> >archives, you must subscribe before posting.
> >
> >[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> >Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> >subscribe: xml-dev-subscribe@lists.xml.org List archive: 
> >http://lists.xml.org/archives/xml-dev/
> >List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
> >
> 
> _________________________________________________________________
> Grandes éxitos, superhéroes, imitaciones, cine y TV... 
> http://es.msn.kiwee.com/ Lo mejor para tu móvil.
> 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS