Results 1 to 12 of 12

Thread: XmlTextWriter class question

Threaded View

  1. #1

    Thread Starter
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704

    XmlTextWriter class question

    Using the XmlTextWriter class, how would I write out the line bolded below with the results shown below:
    Code:
    <?xml version="1.0" ?>
    <?qbxml version="2.0"?>
    <QBXML>
      <QBXMLMsgsRq onError = "stopOnError">
        <CustomerAddRq requestID = "1">
          <CustomerAdd>
            <Name>Some Guy</Name>
          </CustomerAdd>
        </CustomerAddRq>
      </QBXMLMsgsRq>
    </QBXML>
    I am trying to start an element but also include addt'l information...
    namely, onError = "stopOnError"
    If I use
    VB Code:
    1. myXml.WriteStartElement("QBXMLMsgsRq onError='stopOnError'", Nothing)

    I get thiswhere the ending tag also includes the extra info)
    Code:
    <?xml version='1.0' ?>
    <QBXML>
      <QBXMLMsgsRq onError='stopOnError'>
        <CustomerAddRq requestID='1'>
          <CustomerAdd>
            <Name>Karl</Name>
          </CustomerAdd>
        </CustomerAddRq requestID='1'>
      </QBXMLMsgsRq onError='stopOnError'>
    </QBXML>ML>

    Now obviously I know why it makes the end tag the same...but I can't figure out how to get around that...
    I want the bolded line above to just read </QBXMLMsgsRq>. In case you are wondering, this is xml structured request for adding a customer to Intuit's Quickbooks.
    Last edited by nemaroller; Apr 23rd, 2003 at 12:08 PM.

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