Click here to Skip to main content
16,004,898 members
Home / Discussions / XML / XSL
   

XML / XSL

 
QuestionNewbie sanity check Pin
john john mackey17-Nov-06 6:22
john john mackey17-Nov-06 6:22 
AnswerRe: Newbie sanity check Pin
LiquidE_SA20-Nov-06 6:11
LiquidE_SA20-Nov-06 6:11 
Questiondisplaying an image with the path in the xml? Pin
Support12316-Nov-06 20:43
Support12316-Nov-06 20:43 
AnswerRe: displaying an image with the path in the xml? Pin
Sushant_Mathur16-Nov-06 23:53
Sushant_Mathur16-Nov-06 23:53 
GeneralRe: displaying an image with the path in the xml? Pin
Support12317-Nov-06 0:02
Support12317-Nov-06 0:02 
GeneralRe: displaying an image with the path in the xml? Pin
Sushant_Mathur19-Nov-06 21:18
Sushant_Mathur19-Nov-06 21:18 
GeneralRe: displaying an image with the path in the xml? Pin
Support12319-Nov-06 23:21
Support12319-Nov-06 23:21 
QuestionCannot select nodes from Xml document with XPath expressions Pin
Kenneth Broendum16-Nov-06 3:36
Kenneth Broendum16-Nov-06 3:36 
I have a XSchema document and an instance document. Validation of the instance document against the Schema works fine.
My problem is that I'm unable to select nodes from the xml-document. Namespace delarations are shown below.
For instance

XmlNodeList nodeList = xmlDoc.DocumentElement.Select("//Command")

returns 0 nodes.

Xml header:

<?xml version="1.0" ?>
<Commands xmlns="http://nn.taurus.dk/NN"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://nn.taurus.dk/NN">

... rest of xml-document


Schema header:

<?xml version="1.0" encoding="utf-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://nn.taurus.dk/NN"
targetNamespace="http://nn.taurus.dk/NN"
elementFormDefault="qualified"
attributeFormDefault="unqualified">

... rest of XSchema-document

Can anybody tell me what is wrong with either namespace declarations or my select-statement ?



If I remove most of the namespace stuff and only that, the statement

XmlNodeList nodeList = xmlDoc.DocumentElement.Select("//Command")

returns the expected result.

Headers from the files where the Select statement works, are shown below.

Xml header
<?xml version="1.0" ?>
<Commands xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="Customer.xsd">


Schema header:
<?xml version="1.0" encoding="utf-8"?>

< xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
AnswerRe: Cannot select nodes from Xml document with XPath expressions Pin
Stefan Troschuetz16-Nov-06 5:04
Stefan Troschuetz16-Nov-06 5:04 
QuestionDiffgram in ASP.NET Pin
honey12315-Nov-06 23:29
honey12315-Nov-06 23:29 
AnswerRe: Diffgram in ASP.NET Pin
Sushant_Mathur16-Nov-06 23:56
Sushant_Mathur16-Nov-06 23:56 
Questionembed an image into xml? Pin
Support12315-Nov-06 22:20
Support12315-Nov-06 22:20 
QuestionHow to deserailize data from xml file Pin
swguy2315-Nov-06 18:56
swguy2315-Nov-06 18:56 
AnswerRe: How to deserailize data from xml file Pin
Stefan Troschuetz15-Nov-06 22:02
Stefan Troschuetz15-Nov-06 22:02 
GeneralRe: How to deserailize data from xml file Pin
swguy2315-Nov-06 23:09
swguy2315-Nov-06 23:09 
QuestionDeclaration or Processing Instruction Pin
h@s@n15-Nov-06 6:54
h@s@n15-Nov-06 6:54 
AnswerRe: Declaration or Processing Instruction Pin
George L. Jackson15-Nov-06 11:55
George L. Jackson15-Nov-06 11:55 
QuestionRegarding XML Pin
dayakar_dn15-Nov-06 3:11
dayakar_dn15-Nov-06 3:11 
AnswerRe: Regarding XML Pin
led mike15-Nov-06 4:53
led mike15-Nov-06 4:53 
AnswerRe: Regarding XML Pin
George L. Jackson15-Nov-06 12:19
George L. Jackson15-Nov-06 12:19 
QuestionAmending XML data Pin
gowland037914-Nov-06 2:06
gowland037914-Nov-06 2:06 
AnswerRe: Amending XML data Pin
led mike14-Nov-06 5:12
led mike14-Nov-06 5:12 
QuestionISIN code to Name Pin
jan larsen12-Nov-06 21:12
jan larsen12-Nov-06 21:12 
QuestionXML (API) in visual studio 2005 Pin
barak16048711-Nov-06 23:51
barak16048711-Nov-06 23:51 
AnswerRe: XML (API) in visual studio 2005 Pin
Stefan Troschuetz12-Nov-06 0:06
Stefan Troschuetz12-Nov-06 0:06 

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.