<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to feature-requests</title><link href="https://sourceforge.net/p/rapidxml/feature-requests/" rel="alternate"/><link href="https://sourceforge.net/p/rapidxml/feature-requests/feed.atom" rel="self"/><id>https://sourceforge.net/p/rapidxml/feature-requests/</id><updated>2020-05-01T12:52:29.785000Z</updated><subtitle>Recent changes to feature-requests</subtitle><entry><title>#3 Function to check if a node is a self-closed tag</title><link href="https://sourceforge.net/p/rapidxml/feature-requests/3/?limit=25#0ec4" rel="alternate"/><published>2020-05-01T12:52:29.785000Z</published><updated>2020-05-01T12:52:29.785000Z</updated><author><name>Open Projects</name><uri>https://sourceforge.net/u/andry81/</uri></author><id>https://sourceforge.net489c55ef60d638330920b0dbe92d321dc680b008</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I've a fork with patched implementation to explicitly declare a self-closed tag: &lt;a href="https://sourceforge.net/p/tacklelib/3dparty--rapidxml/HEAD/tree/branches/"&gt;https://sourceforge.net/p/tacklelib/3dparty--rapidxml/HEAD/tree/branches/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;rapidxml&lt;/span&gt;::&lt;span class="nv"&gt;xml_node&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nv"&gt;node&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; ...&lt;span class="c1"&gt;; node; node = node-&amp;gt;next_sibling())&lt;/span&gt;
{
  &lt;span class="nv"&gt;node&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;flags&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;node&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;flags&lt;/span&gt;&lt;span class="ss"&gt;()&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="nv"&gt;rapidxml&lt;/span&gt;::&lt;span class="nv"&gt;node_self_closed_tag&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
}
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>Function to check if a node is a self-closed tag</title><link href="https://sourceforge.net/p/rapidxml/feature-requests/3/" rel="alternate"/><published>2020-04-27T02:50:11.703000Z</published><updated>2020-04-27T02:50:11.703000Z</updated><author><name>Open Projects</name><uri>https://sourceforge.net/u/andry81/</uri></author><id>https://sourceforge.net3d1413db21368162c6b41b2cd4f90409ead03a8a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Function to check if a node is a self-closed tag (&amp;lt;.../&amp;gt;) to process not self-closed tags differently.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Flag to skip namespaces.</title><link href="https://sourceforge.net/p/rapidxml/feature-requests/2/" rel="alternate"/><published>2014-07-02T09:52:45.988000Z</published><updated>2014-07-02T09:52:45.988000Z</updated><author><name>Bernd</name><uri>https://sourceforge.net/u/bernd2066/</uri></author><id>https://sourceforge.net443c611982ea51f4b4e3a6a767046eec66f92ce3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;It would be usefull to have a flag that lets RapidXML skip any namespace-prefixes in elements and attributes.&lt;br /&gt;
E.g.&lt;br /&gt;
 -&amp;gt; name should be set to "link", not "atom:link".&lt;/p&gt;
&lt;p&gt;Reason:&lt;br /&gt;
We try to use RapidXML in an embedded system to read user-created XML (GPX or KML in this case). These schemata are using elements from different namespaces. &lt;br /&gt;
We not care about validity (we write human-oriented SW) and have no elements that may be ambiguous - even if we ignore the namespaces.&lt;/p&gt;
&lt;p&gt;I think this problem occurs always if you have to parse external XML. &lt;br /&gt;
With RapidXML the handling of namespaces is job of the client SW. &lt;br /&gt;
If namespaces are only needed for validity, it would be helpful to have a flag to skip it during parsing (to spare code and processing time).&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#1 rapidxml::file wchar_t filename support</title><link href="https://sourceforge.net/p/rapidxml/feature-requests/1/?limit=25#3e4c" rel="alternate"/><published>2014-02-28T19:33:23.788000Z</published><updated>2014-02-28T19:33:23.788000Z</updated><author><name>Tom Plunket</name><uri>https://sourceforge.net/u/plunket/</uri></author><id>https://sourceforge.netb3ba70faa19dd14462c84f5a7216698ebc8fe489</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;See &lt;a href="https://sourceforge.net/p/rapidxml/patches/8/"&gt;https://sourceforge.net/p/rapidxml/patches/8/&lt;/a&gt; for a version which avoids adding another template parameter to the class (it adds one to the constructor only) and also writes the filename as the char version did to the exception that is thrown.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>rapidxml::file wchar_t filename support</title><link href="https://sourceforge.net/p/rapidxml/feature-requests/1/" rel="alternate"/><published>2010-02-17T14:23:12Z</published><updated>2010-02-17T14:23:12Z</updated><author><name>encladeus</name><uri>https://sourceforge.net/u/encladeus/</uri></author><id>https://sourceforge.net099621df52465d7030c97e3293d2f598b8e47d03</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;At the moment only char* filenames can be specified with rapidxml::file. However, it would be even more useful if it supported wchar_t* filenames.&lt;/p&gt;
&lt;p&gt;As one possible solution, I have experimented with making the filename type a template parameter, as follows:&lt;/p&gt;
&lt;p&gt;rapidxml::file&amp;lt;char,wchar_t&amp;gt; xml_file(L"asdf.xml");&lt;/p&gt;
&lt;p&gt;template&amp;lt;class Ch = char, class Fnt = char&amp;gt;&lt;br /&gt;
class file&lt;br /&gt;
{    &lt;br /&gt;
public:&lt;/p&gt;
&lt;p&gt;//! Loads file into the memory. Data will be automatically destroyed by the destructor.&lt;br /&gt;
//! \param filename Filename to load.&lt;br /&gt;
file(const Fnt *filename)&lt;br /&gt;
{&lt;br /&gt;
using namespace std;&lt;br /&gt;
// Open stream&lt;br /&gt;
basic_ifstream&amp;lt;Ch&amp;gt; stream(filename, ios::binary);&lt;br /&gt;
if (!stream)&lt;br /&gt;
throw runtime_error(string("cannot open file "));&lt;/p&gt;
&lt;p&gt;The code snippet above works with wchar_t, but had to modify the throw runtime_error to not append the filename.&lt;/p&gt;
&lt;p&gt;Obviously there are many other ways to implement wchar_t filename support.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>