wxXML header

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Nunki
I live to help wx-kind
I live to help wx-kind
Posts: 176
Joined: Fri Sep 14, 2012 8:26 am
Location: Kontich, Belgium
Contact:

wxXML header

Postby Nunki » Fri Jul 13, 2018 10:16 am

Hi All,

Using wxXml I get an xml file like this

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<vcs-pos:financialTrxRequest xmlns:vcs-pos="http://www.vibek.com/pos" xmlns:vcs-device="http://www.vibek.com/device">


from

Code: Select all

 XmlRoot = new wxXmlNode(wxXML_ELEMENT_NODE ,PAYWORLD::ENVELOPE);
 XmlRoot->AddAttribute(PAYWORLD::ATTR_SCHEMA,PAYWORLD::SCHEMA);
 XmlRoot->AddAttribute(PAYWORLD::ATTR_DEV,PAYWORLD::DEV);

 XmlDoc.SetRoot(XmlRoot);           
 XmlDoc.Save(sXmlFile);


However I need to add a tag to the header. Payworld requires it to be

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>


Is this even possible with wxXml ?

regards
Nunki

User avatar
doublemax
Moderator
Moderator
Posts: 12604
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxXML header

Postby doublemax » Fri Jul 13, 2018 1:27 pm

I don't see any official way to do that, but maybe you can trick the system by setting a "special" version string:

Code: Select all

doc.SetVersion( "1.0\" standalone=\"yes") );
Untested, no warranty :)
Use the source, Luke!


Return to “C++ Development”

Who is online

Users browsing this forum: No registered users and 12 guests