Geeks With Blogs
Justin Oehlmann Looking for Love in all the Wrong Places :-)

GoodToGo :)

Best XML Editor is Altova XMLSpy 2011

For whatever reason Piratebay has trojans and other nasties..Search in for

Altova XMLSpy Enterprise Edition SP1 2011 v13.0.1.0 Also if you like the product purchase it in a Commercial Enviroment

Any well structured/complex XML can be parsed @ the speed of light using XPATH querys and not the C# objects

XPathNodeIterator and others etc ....Never do loops  or Genirics or whatever highlevel language technology. Use the power of XPATH

i.e Will use a Simple (Do while) as an example. We could have many different techs all achieveing the same result

Instead of

  xmlNI2 = xmlNav.Select("/p:BookShop")
        if (xmlNI2.Count != 0)
                                while ((xmlNI2.MoveNext()))

             string aNode =xmlNI2.SelectSingleNode('Book', nsmgr);

if (aNode =="The Book I am after")

      Console.WriteLine("Found My Book);


This lengthy cumbersome task can be achieved with a simple XPATH query

Console.WriteLine((xmlNavg.SelectSingleNode("/p:BookShop/Book[.='The Book I am aFter ']", nsmgr)).Value.ToString());

Use the power of the parser and eliminate the middleman C#/MSIL/JIT etc etc

Get Started Fast and use the parser as Outlined

1) Open XML and goto Grid Mode

2) Select XPATH tab on the bottom viewer/window as shown

 From here you get intellisense and can quickly learn how to navigate/find the data using XPATH

A key component to Navigation with XPATH is to use the "../ " command . This basically says from where I am now go up 1 level . With Xpath all commands are cumalative. i.e you can search for a book title @ the 2nd level of the XML and from there traverse 15 layers to paragraphs or words on a page with expression validation occuring throughout this process etc

 (So in essence you may have arrived @ a node within the XML and have met 15 conditions along the way )

Given 1-2 days with XmlSpy and XPATH you unlock a technology that is super fast and simple to use.

XML is a core component to what lays under the hood of so many techs. So it is no wonder that you want to be able to goto  the atomic level to achieve the result you want


P.S For a long time I saw XML as slow and a bit boring but now converted 



Posted on Monday, November 14, 2011 9:38 PM | Back to top

Comments on this post: XPath & XML EDI B2B

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Justin Oehlmann | Powered by: