Results 1 to 4 of 4

Thread: XML - DTD - Special Characters

  1. #1
    Join Date
    Sep 2003

    Question XML - DTD - Special Characters

    I have this xml.. and the dtd is pasted below:

    <?xml version="1.0" standalone="no"?>
    <!DOCTYPE root SYSTEM "http://shoptest-ar.itx.net/ASynch/spec_char.dtd"> <root> <record> <srv>text</srv> <database>text</database> <dblogin>text</dblogin> <dbpwd>astest</dbpwd> <login>login</login> <password>e7(</password> <option>1</option> <LastSync>06/08/2003 03:21:30 p.m.</LastSync> </record> </root>

    When I try to load it using set xml_dom = Server.CreateObject("MSXML2.DOMDocument") I get the folowing error message: "An invalid character was found in text content." That's because of password which has special characters. What am I doing wrong? I want that characters to be accepted. They are always different. That xml is generated automatically when the user logs into the system.. The password is the one which the users enters but it is encrypted. Any idea, please? Thank you very much!

    <!-- ENTITY sets -->

    <!-- ISO 9573-13 -->

    <!ENTITY % ent-isoamsa SYSTEM "dtd\isoamsa.ent" > %ent-isoamsa;

    <!ENTITY % ent-isoamsb SYSTEM "dtd\isoamsb.ent" > %ent-isoamsb;

    <!ENTITY % ent-isoamsc SYSTEM "dtd\isoamsc.ent" > %ent-isoamsc;

    <!ENTITY % ent-isoamsn SYSTEM "dtd\isoamsn.ent" > %ent-isoamsn;

    <!ENTITY % ent-isoamso SYSTEM "dtd\isoamso.ent" > %ent-isoamso;

    <!ENTITY % ent-isoamsr SYSTEM "dtd\isoamsr.ent" > %ent-isoamsr;

    <!ENTITY % ent-isogrk3 SYSTEM "dtd\isogrk3.ent" > %ent-isogrk3;

    <!ENTITY % ent-isogrk4 SYSTEM "dtd\isogrk4.ent" > %ent-isogrk4;

    <!ENTITY % ent-isomfrk SYSTEM "dtd\isomfrk.ent" > %ent-isomfrk;

    <!ENTITY % ent-isomopf SYSTEM "dtd\isomopf.ent" > %ent-isomopf;

    <!ENTITY % ent-isomscr SYSTEM "dtd\isomscr.ent" > %ent-isomscr;

    <!ENTITY % ent-isotech SYSTEM "dtd\isotech.ent" > %ent-isotech;

    <!-- ISO 8879 -->

    <!ENTITY % ent-isobox SYSTEM "dtd\isobox.ent" > %ent-isobox;

    <!ENTITY % ent-isocyr1 SYSTEM "dtd\isocyr1.ent" > %ent-isocyr1;

    <!ENTITY % ent-isocyr2 SYSTEM "dtd\isocyr2.ent" > %ent-isocyr2;

    <!ENTITY % ent-isodia SYSTEM "dtd\isodia.ent" > %ent-isodia;

    <!ENTITY % ent-isogrk1 SYSTEM "dtd\isogrk1.ent" > %ent-isogrk1;

    <!ENTITY % ent-isogrk2 SYSTEM "dtd\isogrk2.ent" > %ent-isogrk2;

    <!ENTITY % ent-isolat1 SYSTEM "dtd\isolat1.ent" > %ent-isolat1;

    <!ENTITY % ent-isolat2 SYSTEM "dtd\isolat2.ent" > %ent-isolat2;

    <!ENTITY % ent-isonum SYSTEM "dtd\isonum.ent" > %ent-isonum;

    <!ENTITY % ent-isopub SYSTEM "dtd\isopub.ent" > %ent-isopub;

    <!-- MathML aliases for characters defined above -->

    <!ENTITY % ent-mmlalias SYSTEM "dtd\mmlalias.ent" > %ent-mmlalias;

    <!-- MathML new characters -->

    <!ENTITY % ent-mmlextra SYSTEM "dtd\mmlextra.ent" > %ent-mmlextra;

    <!-- end of ENTITY sets -->

    <!ELEMENT root (record)> <!ELEMENT record (srv,database,dblogin,dbpwd,login,password,option,LastSync)> <!ELEMENT srv (#PCDATA)> <!ELEMENT database (#PCDATA)> <!ELEMENT dblogin (#PCDATA)> <!ELEMENT dbpwd (#PCDATA)> <!ELEMENT login (#PCDATA)> <!ELEMENT password (#PCDATA)> <!ELEMENT option (#PCDATA)> <!ELEMENT LastSync (#PCDATA)>

  2. #2
    Join Date
    Dec 2002
    Calgary, Canada
    you will have to replace those characters with their corresponding ASCII value

    something like

    percent sign % &#037;


    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  3. #3
    Join Date
    Sep 2003

    How should I have to replace the special characters? Would you give me a short example, please?
    Thanks in advance,


  4. #4
    Join Date
    Feb 2004

    Special Characters in XML

    I know how what substitutes to used for special characters like & can be substituted by &amp; in XML .

    What I want to know is how can this be done efficiently.
    I want to know how I can automatically tell parser to accept " & " or any other special character, if I cannot do it through parser then how can I tell the parser to convert special characters to accepted character format in XML.


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles