[Home] [By Thread] [By Date] [Recent Entries]

Subject: RE: cdata?
From: "Oleg Tkachenko" <olegt@xxxxxxxxxxxxx>
Date: Sat, 17 Nov 2001 12:17:01 +0200
Hello Michael!

> I mean that I seem to have trouble accessing my cdata "This is my" and
> "text." from something such as this common lil structure:
> 
> <p> This is my <b> bold </b> text. </p>
Oh, I misunderstood you. That all right and there is no problem, character data can be selected by nodetest "text()".
Try to imagine your xml snippet as xpath data model tree:

element p
  |
  +------ text node " This is my "
  |
  +------ element b
  |             |
  |             +------- text node " bold "
  |
  +------ text node " text. "

so you can select text "This is my" by "p/text()[1]" xpath expression etc.

> 
> Am I not supposed to format XML that way or am I just trying to access the
> text in some incorrect way?
No, mixed content is a legal form of conent model in xml.

---
Oleg Tkachenko,
Multiconn International, Israel 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • cdata?
    • Michael - Fri, 16 Nov 2001 23:50:21 -0500 (EST)
      • Oleg Tkachenko - Sat, 17 Nov 2001 03:45:52 -0500 (EST)
        • Michael - Sat, 17 Nov 2001 04:54:02 -0500 (EST)
          • Oleg Tkachenko - Sat, 17 Nov 2001 05:15:11 -0500 (EST) <=
          • Trevor Nash - Sat, 17 Nov 2001 06:11:22 -0500 (EST)
          • David Carlisle - Sat, 17 Nov 2001 09:18:30 -0500 (EST)
      • David Carlisle - Sat, 17 Nov 2001 06:49:55 -0500 (EST)
      • Michael Kay - Sat, 17 Nov 2001 08:05:14 -0500 (EST)
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member