XPATH With NameSpace How you can navigate through…

//XPATH With NameSpace
// How you can navigate through XML document, what it contains namespace

XmlDocument objXML = new XmlDocument();
XmlNamespaceManager nsMan = new XmlNamespaceManager(objXML.NameTable);
nsMan.AddNamespace(“cfdi”, “http://www.sat.gob.mx/cfd/3”);
objXML.Load(strFileName);
Node objNode=objXML.SelectNodes(“cfdi:Comprobante”, nsMan);
objXML=null;
objNode=null;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s