Results 1 to 6 of 6

Thread: [RESOLVED] [XML] Using < and > in XML tags?

  1. #1

    Thread Starter
    Fanatic Member arsmakman's Avatar
    Join Date
    Dec 2001
    Location
    Leiden, Netherlands.
    Posts
    719

    Resolved [RESOLVED] [XML] Using < and > in XML tags?

    Is it possible to use < and > in XML tags?

    Like this: <tag><blah></tag>, so that when I read 'tag', the value of '<blah>' will be returned.

    Thanks.
    No matter how fool-proof your program is, there will always be a better fool.

    Was a post helpful to you? Rate it!

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: [XML] Using < and > in XML tags?

    Yes but change <blah> to &lt;blah&gt;
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: [XML] Using < and > in XML tags?

    Not quite like that.... you have to encode it first.... so that the < becomes &lt; and the > becomes &gt; ... once you have that.... you then need to encode the & so that XML parsers will validate it properly... so &lt; and &gt; become, &amp;lt; and &amp;gt; ..... then you can stick your data into the tags.... nutters I know, but that's the short of it.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4

    Thread Starter
    Fanatic Member arsmakman's Avatar
    Join Date
    Dec 2001
    Location
    Leiden, Netherlands.
    Posts
    719

    Re: [XML] Using < and > in XML tags?

    Can you give me a push in the right direction on 'encoding characters'?

    As my knowledge in XML is not quite up to it.
    No matter how fool-proof your program is, there will always be a better fool.

    Was a post helpful to you? Rate it!

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: [XML] Using < and > in XML tags?

    They just did. To XML-encode a string, just change every < to &lt; and every & to &amp;. You can also change > to &gt;, but that's not actually necessary.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  6. #6

    Thread Starter
    Fanatic Member arsmakman's Avatar
    Join Date
    Dec 2001
    Location
    Leiden, Netherlands.
    Posts
    719

    Re: [XML] Using < and > in XML tags?

    Ah, that's easy. I thought it required some sort of coding, which confused me extra as I was always thaught that XML is not for actual programming, only for file structuring.

    Thanks
    No matter how fool-proof your program is, there will always be a better fool.

    Was a post helpful to you? Rate it!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width