Commit 92d58ffe authored by Dick Hollenbeck's avatar Dick Hollenbeck

XML tweaks

parent 8ec67570
......@@ -27,7 +27,7 @@
#include "macros.h"
typedef wxXmlProperty XATTR;
#define GetAttribs GetProperties
void XNODE::Format( OUTPUTFORMATTER* out, int nestLevel ) throw( IOError )
{
......@@ -53,7 +53,7 @@ void XNODE::FormatContents( OUTPUTFORMATTER* out, int nestLevel ) throw( IOError
std::string utf8;
// output attributes first if they exist
for( XATTR* attr = (XATTR*) GetAttribs(); attr; attr = (XATTR*) attr->GetNext() )
for( XATTR* attr = (XATTR*) GetAttributes(); attr; attr = (XATTR*) attr->GetNext() )
{
utf8 = CONV_TO_UTF8( attr->GetValue() ); // capture the content
......
......@@ -2,6 +2,9 @@
<!--XSL style sheet to EESCHEMA Generic Netlist Format to PADS netlist format
Copyright (C) 2010, SoftPLC Corporation.
GPL v2.
How to use:
https://lists.launchpad.net/kicad-developers/msg05157.html
-->
<!DOCTYPE xsl:stylesheet [
......
......@@ -65,6 +65,27 @@ public:
* @throw IOError if a system error writing the output, such as a full disk.
*/
virtual void FormatContents( OUTPUTFORMATTER* out, int nestLevel ) throw( IOError );
#if wxABI_VERSION < 20811 // change the if as needed
wxString GetAttribute( const wxString& attrName, const wxString& defaultVal ) const
{
return GetPropVal(attrName, defaultVal);
}
bool GetAttribute( const wxString& attrName, wxString *value ) const
{
return GetPropVal(attrName, value);
}
void AddAttribute( const wxString& attrName, const wxString& value )
{
AddProperty(attrName, value);
}
wxXmlProperty* GetAttributes() const
{
return GetProperties();
}
#endif // wx < 2.8.11
};
#endif // _XATTR_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment