Click here to Skip to main content
15,885,048 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralMathML Pin
Hariharan210515-Apr-08 21:51
Hariharan210515-Apr-08 21:51 
QuestionHow do I import mulitiple XML files into Microsoft Excel in one shot? Pin
Mike A. Fowler15-Apr-08 4:45
Mike A. Fowler15-Apr-08 4:45 
QuestionDoes anyone know how to access entities from an embedded tag? Pin
Mike A. Fowler14-Apr-08 6:09
Mike A. Fowler14-Apr-08 6:09 
AnswerRe: Does anyone know how to access entities from an embedded tag? Pin
Mark J. Miller14-Apr-08 8:58
Mark J. Miller14-Apr-08 8:58 
Questionc# XMLNODE SelectNodes Pin
mpavas13-Apr-08 21:36
mpavas13-Apr-08 21:36 
GeneralRe: c# XMLNODE SelectNodes Pin
N a v a n e e t h13-Apr-08 23:02
N a v a n e e t h13-Apr-08 23:02 
GeneralRe: c# XMLNODE SelectNodes Pin
mpavas13-Apr-08 23:17
mpavas13-Apr-08 23:17 
GeneralRe: c# XMLNODE SelectNodes Pin
N a v a n e e t h14-Apr-08 1:50
N a v a n e e t h14-Apr-08 1:50 
Ok, XPath and XML file needs to be altered since you are using namespaces. Check the below one
<?xml version="1.0" encoding="iso-8859-1"?>
<CustomerSearch xmlns:ab="http://test.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://server:81/testi-schemas/dev/test.xsd">
  <EventReport xmlns="http://test.com/core/events/">
    <Environment>
      <Validation>Off</Validation>
    </Environment>
  </EventReport>
  <Parameters CustomerId="" AdvertisingType=" " Email="mpavas@yahoo.com"/>
  <Results>
    <Customer CustomerId="22334" Name="pavas malviya" Address1="" Address2="WASHINGTONDC" Address3="DC 20431"></Customer>
  </Results>
</CustomerSearch>
If you have the above XML file, you can get Customer node using the following XPath.
XmlDocument document = new XmlDocument();
document.Load(@"c:\XMLFile1.xml");
XmlNamespaceManager namespaceManager = new XmlNamespaceManager(document.NameTable);
XmlElement customerSearchElement = document.DocumentElement;
XmlNode customerNode = customerSearchElement.SelectSingleNode("descendant::Results/Customer", namespaceManager);
if (customerNode != null)
   //do your code
Also check some beginer tutorial on XPath and writing XML namespaces.

Hope this helps

All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia

How to use google | Ask smart questions

GeneralRe: c# XMLNODE SelectNodes Pin
Christian Graus13-Apr-08 23:58
protectorChristian Graus13-Apr-08 23:58 
QuestionRe: c# XMLNODE SelectNodes Pin
mpavas14-Apr-08 0:10
mpavas14-Apr-08 0:10 
GeneralRe: c# XMLNODE SelectNodes Pin
Christian Graus14-Apr-08 0:20
protectorChristian Graus14-Apr-08 0:20 
GeneralRe: c# XMLNODE SelectNodes Pin
mpavas14-Apr-08 0:41
mpavas14-Apr-08 0:41 
QuestionDoes anyone know how to take a XML file and store it into a C++ structure? Pin
Mike A. Fowler12-Apr-08 6:45
Mike A. Fowler12-Apr-08 6:45 
AnswerRe: Does anyone know how to take a XML file and store it into a C++ structure? Pin
pmarfleet12-Apr-08 8:05
pmarfleet12-Apr-08 8:05 
GeneralRe: Does anyone know how to take a XML file and store it into a C++ structure? Pin
Mike A. Fowler12-Apr-08 9:30
Mike A. Fowler12-Apr-08 9:30 
AnswerRe: Does anyone know how to take a XML file and store it into a C++ structure? Pin
pmarfleet12-Apr-08 10:33
pmarfleet12-Apr-08 10:33 
GeneralRe: Does anyone know how to take a XML file and store it into a C++ structure? Pin
Mike A. Fowler13-Apr-08 3:30
Mike A. Fowler13-Apr-08 3:30 
GeneralRe: Does anyone know how to take a XML file and store it into a C++ structure? Pin
pmarfleet13-Apr-08 3:45
pmarfleet13-Apr-08 3:45 
GeneralXML versioning Pin
helen.gonzalez9-Apr-08 22:23
helen.gonzalez9-Apr-08 22:23 
GeneralRe: XML versioning Pin
led mike10-Apr-08 5:56
led mike10-Apr-08 5:56 
GeneralMaintain the order of the xml Pin
Yariv9-Apr-08 20:38
Yariv9-Apr-08 20:38 
GeneralRe: Maintain the order of the xml Pin
Mark J. Miller14-Apr-08 6:33
Mark J. Miller14-Apr-08 6:33 
GeneralRe: Maintain the order of the xml Pin
Yariv14-Apr-08 10:13
Yariv14-Apr-08 10:13 
GeneralRe: Maintain the order of the xml Pin
Mark J. Miller14-Apr-08 10:33
Mark J. Miller14-Apr-08 10:33 
GeneralRe: Maintain the order of the xml Pin
Yariv14-Apr-08 20:41
Yariv14-Apr-08 20:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.