|
Have you tried item[@xsi:type='ns:AAA'] as the match attribute?
|
|
|
|
|
Worked like a charm!
Thanks
"Sucks less" isn't progress - Kent Beck [^]
Awasu 1.1 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Hi..
I exported an access 2000 table to XML file
in some elements appears:
<Title>myDataHere</Title>
in some elements appears:
<Title>
<![CDATA[myDataHere]]>
</Title>
what does CDATA do ?
what if I ommit it ?
note than in cases that CDATA appears myDataHere includes (") or (..)
|
|
|
|
|
CDATA specifies a chunk of raw character data, terminated by ]]> . This allows you to embed data with characters with special meaning in XML (namely, < , > , & , and " ) without escaping them.
More info (straight from the XML spec):
http://www.w3.org/TR/REC-xml#sec-cdata-sect[^]
- Mike
|
|
|
|
|
CDATA is simply data that will not be parsed when read. For example, I have an XML help file that contains code snippets for common programming tasks. Since a lot of the characters in the code would violate XML rules and I don't want the format touched. I enter that data into my file as CDATA-type nodes.
Cheers,
Tom Archer
Inside C#, Extending MFC Applications with the .NET Framework
It's better to listen to others than to speak, because I already know what I'm going to say anyway. - friend of Jörgen Sigvardsson
|
|
|
|
|
I didn't know about this. Helpful!
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Coolbeans. I'm glad I could you also.
By the way, great sig! Funny how words like that can mean different things to you depending on what you're currently going through in life.
Cheers,
Tom Archer
Inside C#, Extending MFC Applications with the .NET Framework
It's better to listen to others than to speak, because I already know what I'm going to say anyway. - friend of Jörgen Sigvardsson
|
|
|
|
|
Tom Archer wrote:
By the way, great sig!
Tom Archer wrote:
Funny how words like that can mean different things to you depending on what you're currently going through in life.
True.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Thank you all
|
|
|
|
|
I need to access the value of a node that also contains childnodes such as
<node>
text
<child>value</child>
</node>
Inner text doesn't work because I get the child text also. I think that the way Innertext is done is pretty bad. Any Ideas? Thanks.
Steve
Steve
Not all who wander are lost...
|
|
|
|
|
You can just iterate through the children (IXMLDOMNodeList) checking the type (IXMLDOMNode::nodeType), if it is a text node (NODE_TEXT) append the value to your string otherwise keep iterating...
|
|
|
|
|
Thanks. Will this also work on .NET?
Steve
Not all who wander are lost...
|
|
|
|
|
Sure, it'll work with any DOM/Language, just the interface/method/constants names may vary slightly...
|
|
|
|
|
|
I'd like to store some data from an XML file to an Oracle Database but there is a problem with several czech characters that are not stored (interpreted, shown?) properly in the database.
The way: XML file (UTF-8 charset, czech characters put into document by using XMLSpy) --> MS-VS6, SP5 C++ program (MSXML 4, import <msxml4.dll> raw_interfaces_only) --> DOM(load method, firstChild->get_text(BSTR)) --> BSTR variable --> wchar_t* --> SQLExecDirectW --> connection string including switch to enable forcing SQLWCHARs --> Oracle DB (using Oracle Driver 9.2., CZECH_CZECH REPUBLIC.EE8ISO8859P2 in registry, all Homes) --> displayed in Toad (Arial, Central European). Some characters are replaced by similar ones, some of them can't be recognized.
Please, help!
|
|
|
|
|
I see now, that Excel is showing the data properly. Toad doesn't...
|
|
|
|
|
Can anyone tell me how generate a sample XML instance from a XSD file.
|
|
|
|
|
Is there a way to specify a search root to selectSingleNode?
it always gives me the first hit in the file even if the Node that is calling the function is located after the node that gets found.
for example, in file
<forms count="2">
__
____<item>1<\Item>
__
__
____<item>2<\Item>
__
(for some reason the opening Item tags dissapear when i post)
How should I Locate Item 2(In c++) without using child or nextsibling pointers(I cant guarantee the order of the child Items)
|
|
|
|
|
Sorry but that is what selectSingleNode does, return the first node that matches the criteria. You could and the value you are looking for (2) to search string. "forms/form/2" (wrong syntax I know but you get the idea), possibly "forms/form/position() == 2" might work.
|
|
|
|
|
So does that mean there is no search function that allows you to enter a starting point to search from?
I'm not familiar with position(). Except that it is XSL and I do not have a stylesheet. Is it possible to use the XSL funtions without that?
|
|
|
|
|
Oops. I take my previous posting back . You should be able to create an XPATH with the position() function. position is an XPATH function that maybe be used in an XSLT. So you just need to create the correct XPATH. Though position is used when you are in a loop. So using it directly will not help.
Instead in your case it would be something like Forms/Form/Item[2] or Forms/Form[2]
|
|
|
|
|
Thanks. that did the job
although for the record it was /Form[2]/Item instead of /Form/Item[2]
|
|
|
|
|
does anybody know how to: bind to xml files to one datagrid
thanks
Da Intern
|
|
|
|
|
Like was said in the other forum, the schemas must match first.
|
|
|
|
|
can you bind mutiple cml files to 1 datagrid in aspx
thanks in advance
Da Intern
|
|
|
|