[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to get the file position of a IXMLDOMNode ?

Posted on 2003-11-25
3
Medium Priority
?
838 Views
Last Modified: 2011-10-03
After loading a xml file, I get a IXMLDOMNode from a Xpath with the method selectSingleNode.
How to get the corresponding file position in the XML file, and also its line number & character number ?

JPG
0
Comment
Question by:JP_Goblet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
sparkplug earned 500 total points
ID: 9818722
The XML DOM doesn't store the file position. There is a filepos property but this only applies to parsing errors. Depending on why you need to know the file position, I guess the best solution, other then reading the XML file character by character, would be to use SAX http://msdn.microsoft.com/library/en-us/xmlsdk/htm/sax_devgd_overview_0jef.asp. The ISAXLocator interface http://msdn.microsoft.com/library/en-us/xmlsdk/htm/sax_isaxlocator_7kx1.asp provides both columnNumber and LineNumber properties.

>S'Plug<
0
 
LVL 9

Expert Comment

by:sparkplug
ID: 9819181
http://www.experts-exchange.com/help.jsp#hi73

Why the grade C? Did this not answer your question? If you needed more information you should say so. I now have a grade C against my name just for taking the time to answer your question. Thanks.

>S'Plug<
0
 

Author Comment

by:JP_Goblet
ID: 9823136
sorry i'm not familiar with experts exchange conventions, i did not think that giving a C grade was almost like a blame...
I gave a C grade because your answer did not really learn anything to me; i knew about SAX but it seems to me a very complicated solution. But perhaps there is no other way.
If there is a way i can modify the grade, let me know.

JPG
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question