473,322 Members | 1,566 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Writing XPath query to search cdata

Max
Hi

I have an XML file which is something like this

<XML>
<FORMS>
<FORM><![CDATA[F1# (a+b)2 = a2 +b2 +2ab]]></FORM>
<FORM><![CDATA[F2# (a-b)2 = a2 +b2 -2ab]]></FORM>
</FORMS>
<MAIN>
<MYFORM>
<![CDATA[F1]]>
</MYFORM>
</MAIN>
</XML>

This is just a sample XML file ... the orginal XML will be more than 200 lines

Can i do an XPath query to find all a in the XML ?
the purpose is to change all a to p ...

please help

regards

MaX
Jul 21 '05 #1
1 2250
Consider using regular expressions & replacing the 'a' with 'p' in the xml
string, before ( or without) turning the string into an XmlDocument

Angel
O:]
"Max" <ma****@excite.com> wrote in message
news:fc************************@posting.google.com ...
Hi

I have an XML file which is something like this

<XML>
<FORMS>
<FORM><![CDATA[F1# (a+b)2 = a2 +b2 +2ab]]></FORM>
<FORM><![CDATA[F2# (a-b)2 = a2 +b2 -2ab]]></FORM>
</FORMS>
<MAIN>
<MYFORM>
<![CDATA[F1]]>
</MYFORM>
</MAIN>
</XML>

This is just a sample XML file ... the orginal XML will be more than 200 lines
Can i do an XPath query to find all a in the XML ?
the purpose is to change all a to p ...

please help

regards

MaX

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Nold Fuchs | last post by:
Hi ! I need to isolate some nodes without CDATA inside, the problem is that I can not get an XPATH to differentiate simple text nodes and CDATA nodes. Sample XML : <nodes> <node>some...
7
by: Ot | last post by:
I posted this to the wrong group. It went to m.p.dotnet.languages.vb. Ooops. -------------------------------------------------------------------- I have this tiny problem. I have learned...
1
by: Chris Fink | last post by:
What is a valid XPath Statement to retrieve the data found within the CDATA tag below? Using the XPath statement "/oid" returns "" <oid><!]></oid>
3
by: Sébastien Ros | last post by:
I tries to migrate an existing application from 1.1 to 2.0 but it seems that one of my XPath expressions no more works on this version. I tried a SelectNodes().Count. The result is 1 in v1.1 and...
1
by: Max | last post by:
Hi I have an XML file which is something like this <XML> <FORMS> <FORM><!]></FORM> <FORM><!]></FORM> </FORMS> <MAIN>
2
by: vjethava | last post by:
Hi, I'm relatively new to xml. I want to have a xml element of the form: <!ELEMENT CAR (MAKE, COMPANY)> <!ATTLIST CAR TYPE PCDATA PRICE PCADATA> <!ELEMENT COMPANY (HQ, COMPANY_TYPE)>
15
by: aidy | last post by:
Hi, Is it possible to retrieve CDATA Sections from an XML document? If so, could someone give me a syntax example? Cheers Aidy
5
by: dotnetnoob | last post by:
i got xml file that have <bac:BACnetDevicesand <bac:BACnetDevicetag how do you make a xpath query with that type of tags this is the query that i come up with...
3
by: werD | last post by:
Hello I have an xml document that im currently using a forward only .net repeater on and using some xpath queries to display the data The xml is quite simple <?xml version="1.0"...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.