Solved

Parsing an xml file that is not valid nor well formed

Posted on 2008-10-22
4
286 Views
Last Modified: 2013-11-11
Hello,
I was hoping to use the available tools for parsing XML files, but it turns out that the xml files I have to work with are not valid nor are they well formed.
Might anyone have sample code (example) as to how I could start parsing.  I know that I will have to strip away several lines from the top, then throw it into some Hash map.
Any other suggestions?
0
Comment
Question by:chima
  • 2
  • 2
4 Comments
 

Author Comment

by:chima
ID: 22778733
I later found information about XPath.  My additional question is; Does XPath work with xml files that are not well formed, not valid?
0
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
ID: 22779077
No, XPath only works on wellformed XML.
There are tools that use XPath-like expressions on other types of data (such as reletional database tables, or spreadsheet objects,
but that is because they internally map the data object to XML before releasing the XPath over it.

I assume this answers the additional question.

I have given you some hints on how to solve the original question in your other (equal) question.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/XML/Q_23837605.html
Lets deal with that issue there, not to have two parallel threads
You should not post the same question twice.
0
 

Author Closing Comment

by:chima
ID: 31508845
I agree on not having two postings, but I wanted this question to go to the XPath experts.  I could not see how to add a Zone to the existing questions.
thanks
0
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 22779685
welcome
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
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, …
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

863 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now