요소 또는 속성 중심이며 키 - 값 쌍을 사용하지 않는 XML 직렬기를 권장 할 수 있습니다. 예를 들어Python XML Serializers
는 GAE의 db.model는 to_xml() 함수를 가지고 있지만 그것은 다음과 같이 기록합니다 :
내가 기억하는 바로는<property name="firstname" type="string">John</property>
<property name="lastname" type="string">Doe</property>
<property name="city" type="string">Dallas</property>
<property name="dateTimeCreated" type="gd:when">2009-09-30 19:45:45.975270</property>
는,이 단순한 요소/속성에 비해 XSLT 도구에 매핑하기가 훨씬 더 어렵다 같은 :
원하는 출력
<firstname>John</firstname>
<lastname>Doe</lastname>
<city>Dallas</city>
<dateTimeCreated type="gd:when">2009-09-30 19:45:45.975270</dateTimeCreated>
나는 단지 영적 인식 lib 디렉토리를 시도하고, 내 첫 번째 시도는 작동했지만이 같은 이름 값 쌍 뭔가를 만들어 :
개<attr name="__coredata__" type="dict" id="4760164835402068688" >
<entry>
<key type="string">firstname</key>
<val type="string">John</val>
</entry>
<entry>
<key type="string">lastname</key>
<val type="string">Doe</val>
</entry>
etc...
감사합니다,
닐 월터스
검사 (일명 반성)를 사용하여 맞춤 코드를 작성했습니다. 정말 그렇게 어렵지 않았습니다. – NealWalters