<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="357764" data-post-id="357764">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sergio" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sergio/120/26966_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sergio
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>thank you works really well and clean!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="357764" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/library-to-safely-parse-xml-by-avoiding-random-atom-creation/47493/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-357764" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="357764"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #21"></div>
  </section>
</div>
    <div class="postbit" id="380320" data-post-id="380320">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="SebAlbert" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  SebAlbert
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Just wanted to add to this old discussion for anybody coming across it on their search for XML tooling.</p>
<p>I have the case where XPath (including XML Namespaces) is a must (because I already have lots of them, which I am merely porting), and accessing attributes with XPath is also a must (which Meeseeks refuses to do, according to its documentation).</p>
<p>I found a young rustler NIF binding by <a class="mention" href="/u/jgwmaxwell" rel="nofollow">@jgwmaxwell</a>  (kudos!) here, which up to now seems to tick all my boxes: <a href="https://hex.pm/packages/expath/0.2.0" class="inline-onebox" rel="nofollow">expath | Hex</a></p>
<p>It’s young and 0.2, so might not sound production-ready, but on the other hand, it’s just a rustler binding to a mature library (even though that one is also not 1.0 yet, but that’s quite common in Rust, I believe) - judge for yourself.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="380320" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/library-to-safely-parse-xml-by-avoiding-random-atom-creation/47493/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-380320" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="380320"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #22"></div>
  </section>
</div>
    <div class="postbit" id="381744" data-post-id="381744">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="SebAlbert" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  SebAlbert
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I should, at least for now, append a huge warning under my previous post. It seems Expath makes false promises (parsing only once) and has possibly-wrong examples in the README. With its current state, it’s not useful for my case. See the github issue I opened: <a href="https://github.com/wearecococo/expath/issues/1" rel="noopener nofollow ugc">Add an interface for Nodes/Nodesets for multi-step querying from an XPath context node other than the document root · Issue #1 · wearecococo/expath</a></p>
<p>In case you are interested, I went the route of compiling our xsd files with <code>:erlsom</code> (which generates atoms, but we are in control of those files) (at compile-time!), parsing the (untrusted) XML with the result (which feels extremely fast) - which never creates new atoms - and only then, knowing the XML ist good, feeding it into the (otherwise unsafe regarding atom creation) <code>:xmerl</code> for XPath evaluations (which support context nodes, other than Expath).</p>
<p>Of course, the idea of an upfront Schema validation before using an arbitrary library only works for predefined shapes of XML data.</p>
<p>P.S.: And you should make sure that your XML Schema Definitions don’t allow <code>xs:any</code>, or at least only strictly-checked; the same for attributes.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="381744" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/library-to-safely-parse-xml-by-avoiding-random-atom-creation/47493/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-381744" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="381744"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>